Hi,
Env:
rh9
grafana 10.1.4.-1
influxdb2 2.7.1.-1
I am trying to graph interface traffic Data stored in influxdb ( source is checkmk ) . I got it working to display In and Out Traffic and Status. I was able to use host_name and service_name as dashboard Variables to filter the output via pull down menu. ( show tag values …)
But what i actually want to hide the host and service (interface ) name in Grafana , and want to specify which host_name and service_names are able to be viewed, and put a human readable Business Info into the “Description” .
So i came up with an idea to build a csv with 4 fields ( i have it also now in a postgres ) . The Total list will be about 20 Region , total 200 rows)
Region,Description,host_name,service_name . ( Region,Description is unique , so a selected Description has the corresponding host and service name )
I have now created a Variable to pull down the Region and Description, but i have no idea how i am now able to set the corresponding host_name and service_name variable to add to the dashboard queries for the In and Out metrics.
Currently i use following variables . ( postgres )
psql_region: select distinct(region) from interfaces
psql_description: select distinct(description) from interfaces where region = ‘$psql_region’
i would need to set the corresponding host and service variable for the selected “Description” .
I see there is a possibility to regex named captures to show different value to text ? , but i am not sure if this will work.
Currently i am using this query for the Interface source in Influxdb2.
SELECT mean(“value”) FROM “out” WHERE (“host_name”::tag = ‘$host_name_influx’ AND “service_description”::tag = ‘$service_name_influx’) AND $timeFilter GROUP BY time(5m) fill(none)
SELECT mean(“value”) FROM “in” WHERE (“host_name”::tag = ‘$host_name_influx’ AND “service_description”::tag = ‘$service_name_influx’) AND $timeFilter GROUP BY time(5m) fill(none)
The Variables here are the show tag values from influxdb2, those need somehow to be changed to the postgres sourced values without selecting them directly ( only the Description )
Sry for the wrong wording. I started with influx and grafana 2 days ago .
Thx for any help or hints.
Best regards, Dietmar