问题描述
我有Grafana和Graphite指标.我有一个图表,显示ActiveMQ中某些特定队列的EnqueueCount
.问题在于EnqueueCount
显示自创建队列以来的所有值,因此当我将Grafana中的时间范围缩小到今天到目前为止"时,图形如下所示:
我希望它仅显示当前时间段的值-我希望图形始终从0开始.在这种情况下,我希望将其偏移-2.有一个offset
函数,但是它只是按常数,而我需要诸如由时间段内的最小值偏移"之类的东西.
我浏览了石墨文档,但是找不到任何可以请允许我这样做.
有什么想法可以实现这一目标吗?
我们使用的版本:
- Grafana v4.2.0(提交:349f3eb)
- graphite-web-0.9.12-5
- python-carbon-0.9.12-3
请使用 nonNegativeDerivative()函数-然后您会获得(在您的指标间隔,通常是)分钟内EnqueueCount变化的 rate .如果您想再次计数-使用 integral() .
所以,integral(nonNegativeDerivative(EnqueueCount))
-但是通常人们在寻找利率,那么导数就足够了.
I have Grafana with Graphite metrics. I have a graph showing the EnqueueCount
of some specific queue in ActiveMQ. The problem is that the EnqueueCount
shows all values since the queue was created, so when I narrow down the time range in Grafana to "today so far", the graph looks like this:
I would like it to show only values for current period - I would like the graph to always start at 0. In this case I would like to offset it by -2. There is an offset
function, however it is only by constant, while I would need something like "offset by lowest value in time period".
I went through Graphite documentation, but cannot find any function which would allow me to do this.
Any ideas how I could achieve this?
Versions we use:
- Grafana v4.2.0 (commit: 349f3eb)
- graphite-web-0.9.12-5
- python-carbon-0.9.12-3
Please use nonNegativeDerivative() function - then you will get a rate of EnqueueCount change in (your metric interval, usually it is) minute. If you want to get count again - use integral().
So, integral(nonNegativeDerivative(EnqueueCount))
- but usually people looking for rate, then derivative is enough.
这篇关于将石墨指标偏移当前时间范围内的最小值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!