countSeries() after currentAbove()

Asked by Yousef F

Hello,

Using Grafana with graphite and one of our metrics looks like the following

servers.server0x.status

The metrics can have 3 value, 0,1,2 each one of these metrics means something to us. have about 1000 servers for this query

I am trying to get counts for every number, for example

countSeries(currentAbove(servers.server0x.status, 1.1)) to get us count of servers reporting 2.

This is working just fine when there is servers reporting 2 but when there is no servers reporting 2, count function seems to have a problem cause current above is returning no data points.

Any thoughts on this ? any work around that I am not aware off?

Thanks in advance
Thank you

Question information

Language:
English Edit question
Status:
Answered
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Denis Zhdanov (deniszhdanov) said :
#1

will copy workaround from @DanCeh here - you can use fallbackSeries(countSeries(currentAbove(servers.*.status, 1.1)), constantLine(0))

Revision history for this message
Yousef F (yousef.fattal) said :
#2

sorry had to ask it many places, it's a bit urgent. will continue the conversation on github.
Thanks

Can you help with this problem?

Provide an answer of your own, or ask Yousef F for more information if necessary.

To post a message you must log in.