mrplainswalker
mrplainswalker

Reputation: 791

How do I add a filter by a tag in grafana?

I feel like I'm trying to do something incredibly simple, but I just can't find any cogent explanation anywhere on the internet after an hour of searching.

I'm using InfluxDB/Grafana and I have a DB with several tables. My tables have a tag key named "host" so that I can tell which server the data is coming from.

I want to create a dropdown on my dashboard so that I can select which host's data is displaying on the panels. Is there any way to do this?

Upvotes: 1

Views: 6762

Answers (1)

Jan Garaj
Jan Garaj

Reputation: 28656

Create dashboard variable from the query

SHOW TAG VALUES WITH KEY = "host"

and use it in the panel query. It is documented in the Grafana doc: https://grafana.com/docs/grafana/latest/features/datasources/influxdb/#templating

Upvotes: 3

Related Questions