Offset graphite metrics by the lowest value in current time range

最后都变了- 提交于 2019-12-12 17:13:35

问题


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

回答1:


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.



来源:https://stackoverflow.com/questions/44328074/offset-graphite-metrics-by-the-lowest-value-in-current-time-range

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!