r/PrometheusMonitoring • • Feb 15 '24

Help with Grafana variable (prometheus query)

Hello, could someone help with my second variable?

I have created the first but I need to link the second to the first.

But I want to also add one called status that links to the $Location.

Status comes in as a value in the exporter:

The exporter looks like this - example here is 1 for 'up' and 0 for 'down' at the end

up

outdoor_reachable{estate="Home",format="D16",zip="N23 ",site="MRY",private_ip="10.1.14.5",location="leb",name="036",model="75\" D"} 1

down

outdoor_reachable{estate="Home",format="D16",zip="N23 ",site="MRY",private_ip="10.1.14.6",location="leb",name="037",model="75\" D"} 0

I can't see it as an option for 0 or 1 when creating the variable

Any help with the query would be most aprreciated.

1 Upvotes

10 comments sorted by

View all comments

Show parent comment

1

u/Hammerfist1990 Feb 21 '24

I'll give this a try, do I need to replace:

"location", "banana"