hawkular / hawkular-grafana-datasource

Hawkular Datasource for Grafana
Apache License 2.0
22 stars 35 forks source link

query tags with grafana variables #60

Closed ljuaneda closed 7 years ago

ljuaneda commented 7 years ago

templating is a great feature in grafana

it would be nice to be able to nest variable

$nodename with query=tags/nodename:. $metric with query=tags/nodename:$nodename,descriptor_name:.

jotak commented 7 years ago

We can implement nested variables, however I am not sure about this use case because here, with your query tags/nodename:$nodename,descriptor_name:.* you would get tags for both nodename and descriptor_name, mixed together. I guess this is not what you want, you want only the descriptor names here.

In other words, we must find a way to distinguish in query the tags that we want to be returned from the ones used for refining the query. Some kind of query language: SELECT descriptor_name WHERE nodename=$nodename. That brings the feature request to another level :)

jotak commented 7 years ago

I've added support for nested variable (PR #61 to be merged) , however as said above I doubt it will be enough for your use case. Next step could be a better query language, that we could put in relation with https://github.com/hawkular/hawkular-grafana-datasource/issues/52

ljuaneda commented 7 years ago

thanks, indeed it could be better with the query language.

jotak commented 7 years ago

The tags query language has been released since 1.0.8