Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Template variables in annotations are not working (InfluxDB) #4602

Closed
katiitak opened this issue Apr 7, 2016 · 3 comments
Closed

[Bug] Template variables in annotations are not working (InfluxDB) #4602

katiitak opened this issue Apr 7, 2016 · 3 comments

Comments

@katiitak
Copy link

katiitak commented Apr 7, 2016

  • grafana version: 3.0.0-beta31460024165
  • Datasource: InfluxDB (0.10)
  • OS: Debian Jessie

I created a new template variable with a name "host":
show tag values FROM "something" with key = "host"

Then I created a new annotation:
select value from "something" where host =~ /$host$/ and $timeFilter

When I enable it, I can see from the influxdb logs that it will be formated incorrectrly:
SELECT value FROM testdb."default".something WHERE host =~ /{host1,host2}$/ AND time > now() - 1d

When I use the template with a WHERE condition on a graph, it it is formated correctrly. From the influxdb log:
SELECT value FROM testdb."default".something WHERE host =~ /host1|host2$/ AND time > now() - 1d

@torkelo torkelo added this to the 3.0.0-beta3 milestone Apr 7, 2016
@torkelo torkelo self-assigned this Apr 7, 2016
@torkelo
Copy link
Member

torkelo commented Apr 7, 2016

thanks for reporting this! will be fixed asap

@descrepes
Copy link

Hi,

Got the same issue with the latest build for debian with ES as datasource in annotations.
It only happen when selecting multi values:
{ "fields":["date","_source"], "query":{ "filtered":{ "query":{ "bool":{ "should":[{ "query_string":{ "query":"host:/{host1,host2}/"} }] } }, "filter":{ "bool":{ "must":[{ "range":{ "date":{ "from":1460117264973,"to":1460119064973,"format":"epoch_millis" } } }] } } } }, "size":10000 }

Regards.

@torkelo torkelo closed this as completed in 262c341 Apr 9, 2016
@torkelo
Copy link
Member

torkelo commented Apr 9, 2016

thanks for reporting this fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants