countSeries() after currentAbove()

Asked by Yousef F on 2018-10-11


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


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

English Edit question
Graphite Edit question
No assignee Edit question
Last query:
Last reply:
Denis Zhdanov (deniszhdanov) said : #1

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

Yousef F (yousef.fattal) said : #2

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

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.