Graphite - Templating by tag value


Is it possible to sort variables by tag values?
For expamle:
I’ve got metrics from different servers, and health status is processed when sending data to graphite. When a server has health issue, I’m sending a tag (e.g.: alert=1). When I’m calculating the variable values, I’d like to see only the servers with the tag alert=1.

Thanks for the help in advance!

Did you mean the number of servers or the server names ?

I mean the servers’ names.
Lets say, i have 3 servers: backend1-2-3.
Id like to create a variable with the graphite query …Servers.* which returns all of them, but i only want to see backend1, which has the tag value alarm=1. Other servers have the tag value alarm=0.

so you want to create a graphite data format template that template can be input to influxdb source then take that to a query using grafana am i understanding you correctly ?

your data format are in the form of

can you post sample of your data ? or did you already craeted the template ?

Check also this link for more information on graphite data format


I’ve attached the variable template:

I’d like to query the servers in the “tag value query” field, to show only the CSO2, CSO4, CSO6 and CSO8 where Graphite tag alarm=1.
I think the required behavior is like SeriesByTag function of Graphite, but instead of the panels, I’d like to select the servers on variable level.