是否可以计算指标等级?
我是否缺少某些内容,或者在Promql中没有任何功能来计算以下任一项:
- 在同一度量的先前观察结果中,度量的等级。
- 以前所有同一度量的观察结果之间的度量 。
Quadile_over_time()
的倒置
可能是:
- 计数多少观察值小于每个时间戳上的观察值。
- 分隔为1。总计观测值。
但是,这似乎仍然超出了我的技能,所以我正在寻找有关我应该采取哪种方式的方向。
Am I missing something or is there no function in promql to calculate either one of the following:
- the Rank of a metric among previous observations of that same metric.
- the Percent Rank of a metric among all previous observations of that same metric.
- Something like the inverse of
quantile_over_time()
A roundabout way might be to:
- Count how many observations are smaller than the observation at each timestamp.
- Divide result from 1. by total number of observations.
However that still seems beyond my skill so I am looking for some direction on which way I should pursue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能您需要 share_le_over_time victoriametrics的功能(我从事此ProceTheeus likehus light light System)。例如,以下查询将在每个系列的最后一个小时返回原始样本的份额,名称
m
,该样本不超过42:返回的共享在范围内
0 .. 1
,其中0
表示0%,而1
表示100%。此外,您可以查看 tastagram_share> ,不超过给定的阈值。即,它是
contagrage_quantile
函数的倒数。Probably you need share_le_over_time function from VictoriaMetrics (I work on this Prometheus-like system). For example, the following query returns the share of raw samples during the last hour per each series with name
m
, which don't exceed 42:The returned share is in the range
0 .. 1
, where0
means 0%, while1
means 100%.Additionally, you may look at histogram_share function - it returns the share of samples from histogram buckets, which don't exceed the given threshold. I.e. it is an inverse of
histogram_quantile
function.