Sum of some hosts

Hi,

i currently trying to setup a Singestat with something like “all AccessPoints are up”.
I can use “State” for this which is 0 when all ist fine.

My problem is that i didn’t see the way to do this with more than one host.
With Graphite i used as filter “Accesspointname*” and the Function “SumSeries” and Grafana adds all the state-values of this hosts together.
When i try this with InfluxDB i get only the first host.

Maybe the push of the Hostgroups to InfluxDB fails.
hostgroups = “$host.groups$”
They’re all like this: [ "city1", "company1", "printer" ]
The Preview of the Query looks fine, only hits which contains “city1” are shown.
Like this:

[ "city1", "company1", "printer" ] [ "city1", "company2", "printer" ] [ "city1", "company1", "server" ]…

and so on…

I’m looking forward to hearing from you

Did you try to sum() with where hostname ~= /^accespoint*$/ ?

You can use regex nearly everywhere in Grafana with InfluxDB datasource.

Regards,
Carsten

Hello Carsten,
a
“SELECT mean(“state”) FROM “hostalive” WHERE (“hostname” =~ /^(AP1|AP2 …” is working for me
is working fine for me, i think.
Let’s wait until the next AP dies.

Thank you!
Viper

1 Like