Icinga2 custom Vars via InfluxDB in Grafana


(WizoneDE) #1

Hello together,

I am running checks on icinga2 with a influxDB which is connected with grafana. I have a server system which is have mostly the same name pattern with different “serviceGroups” for DEV Testing and PROD.

How can I create a Query in Grafana -> InfluxDB using the serviceGroups. I tested different types of it

servicegroups = …
servicegroup
service_group
service_groups
serviceGroup
serviceGroups
service.serviceGroups
host.serviceGroup
… but nothing is working.

Query Example
q:“SELECT sum(“value”) FROM “check-access-log” WHERE (“hostname” =~ /servernamemw(a|b)/ AND “serviceGroups” = ‘prod’) AND time >= now() - 6h GROUP BY time(1m) fill(null)”


(Carsten Köbke) #2

You have to modify your influxdb writer object and add the custom var that you want to bee written to the influxdb.