I was wondering if there was a Graphite function or a way of getting the number of points above a certain value. Let's say I have 2,44,24,522,52,534 for the same time and I want to get the number of points over 40, in this case it would be 3. Any tips?
Thanks
You can use
removeBelowValue(your.metric, 40)
to only display points above 40.Then use something to make non zero value equal to 1 (I am thinking of
pow(_, 0)
but I am not sure of how it behaves with None values given byremoveBelowValue
). If you use recent (>0.9.x) version of graphite, you can useisNonNull
instead ofpow
In the end you can use any function to summarize your the 1s you have,
summarize
you should be good. You only have to select your range.Suggestion :
summarize(pow(removeBelowValue(your.metric,40),0), '1hour', 'sumSeries')