2

I have a query in Grafana for templating (against Influx) which has a tag which key contains the $ character.

How can I escape $ to avoid its interpolation with the variable?

Query:

SHOW TAG VALUES FROM "exdemon-analysis" WITH KEY = "analyzed_metric.attributes.$owner"

"analyzed_metric.attributes.$owner" is the key, $owner should not be replaced.

DLanza
  • 113
  • 9

1 Answers1

1

The variable name was also $owner, which makes Grafana replace the $owner string in the field.

Plus, it seems I hit a bug in Influx. It does not like the combination of "." and measurement name with "special characters" in my case "-".

With the following query and not having var with name $owner the problem was solved:

SHOW TAG VALUES FROM "exdemon_analysis" WITH KEY = "analyzed_metric.attributes.$owner"
DLanza
  • 113
  • 9
  • I found this message helpful: "As long as you dont have a template variable named $owner nothing should be replaced." https://github.com/grafana/grafana/issues/11359 – neoakris Jul 25 '19 at 15:20