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

Question: Help setting up Value groups/tags #4299

Closed
rdzimmer-zz opened this issue Mar 8, 2016 · 11 comments
Closed

Question: Help setting up Value groups/tags #4299

rdzimmer-zz opened this issue Mar 8, 2016 · 11 comments

Comments

@rdzimmer-zz
Copy link

I am new to Grafana but really like what I see so far. I am using Grafana 2.6.0 with InfluxDB 0.9.3 to monitor my Kubernetes environment.
I have setup some templates and graphs, but I'm having trouble with the 'Value groups/tags', specifically the 'Tag values query'. All of the online references I see online have a slightly different UI format when building templates, for example http://docs.grafana.org/reference/templating/. I've pasted a screenshot of what I'm trying below.
I'm currently trying to get any group/tag combination to work, so I've simplified my queries to try to get any group tags to work. I can see all of my pods in the group tags when I use the 'Tags query' 'SHOW TAG VALUES FROM "uptime" WITH KEY = "pod_name"'. However, when I select the tags it does not show anything. I am trying a 'Tag values query' of 'SHOW TAG VALUES FROM "uptime" WITH KEY = "pod_name" WHERE "pod_name" = $tag'. I've also tried just '$tag' or hard coding in a pod name.
Any suggestions would be greatly appreciated, thanks!

templating

@rdzimmer-zz rdzimmer-zz changed the title Value groups/tags, help grouping results Question: Help setting up Value groups/tags Mar 8, 2016
@torkelo
Copy link
Member

torkelo commented Apr 3, 2016

Tags query should be SHOW TAGS

@torkelo torkelo closed this as completed Apr 3, 2016
@AlexMaksimkin
Copy link

Also have a problem with this two queries. My tags/tag_values queries are same as on picture above. Setup with InfluxDB v0.10, Grafana v2.6.0.

grafana

Both queries worked in InfluxDB and returned expected results (first - list of tags, second - list of hosts for specific tag), but in Grafana reaction on checkbox/clicking on tag is silence.

Also I see in browser debugger that Grafana do query when I click on tags and receive valid response:
grafana2

Regarding @torkelo recommendation I tried to change "Tags query" to "SHOW TAGS", but then I see an error:

"Template variables could not be initialized: error parsing query: found TAGS, expected CONTINUOUS, DATABASES, DIAGNOSTICS, FIELD, GRANTS, MEASUREMENTS, RETENTION, SERIES, SERVERS, SHARD, SHARDS, STATS, SUBSCRIPTIONS, TAG, USERS at line 1, char 6"

What I do wrong? :)
Thanks!

@torkelo
Copy link
Member

torkelo commented Apr 13, 2016

the tag values query should return values that are a subset of the main values query? Are they?

I mean if you have a main query like:
show tag values with key = hostname

tag query:
show tag values with key = datacenter

tag values query:
show tag values with key = hostname WHERE datacenter=$tag

something like the above meaning the tag values query should return a subset of the main query

@AlexMaksimkin
Copy link

Yep, sure:
Main query: SHOW TAG VALUES FROM redis WITH KEY = "host"
Tags query: SHOW TAG VALUES FROM redis WITH KEY = "services"
Tag values query: SHOW TAG VALUES FROM redis WITH KEY = "host" WHERE services = '$tag'

All queries are checked in influxDB and returned expected results:
first query - all hostnames
second - all services
third - subset of hostnames with specified service
Then I click in tag in Grafana - I see in debugger that query for tag values also returns valid subset of hostnames, but selection in "hosts" checkboxes don't changed.

@torkelo
Copy link
Member

torkelo commented Apr 13, 2016

@AlexMaksimkin this strange, just tested this and it worked fine.
http://play.grafana.org/dashboard/db/templating-value-groups

@hoalequang
Copy link

hoalequang commented Dec 9, 2016

Hi @torkelo ,
I have same issue when use grafana 4.0 and influxdb v0.13.0. and I saw it did not worked in http://play.grafana.org/dashboard/db/templating-value-groups
Could you please help us to review this issue?
Thanks!

@miketwenty1
Copy link

+1
I'm also using grafana 4. Having issues. I also see your link:
http://play.grafana.org/dashboard/db/templating-value-groups
Doesn't seem to have grouping tags working as expected.

@Bklyn
Copy link

Bklyn commented Dec 30, 2016

@torkelo I believe @hoalequang is correct. This feature seems to have regressed. If I go to the templating-value-groups test dashboard, I see two tags available "America" and "Europe". Each tag has a tooltip that indicates which hosts belong to the region, but if I click one of the tags, I simply get a popup menu for selecting individual hostnames / IPs. The tags then disappear, never to return.

@Bklyn
Copy link

Bklyn commented Dec 30, 2016

This seems to be a case of #6752

@tlintz
Copy link

tlintz commented Mar 31, 2017

The case/example above only worked for me after I used regex.
e.g: SHOW TAG VALUES FROM redis WITH KEY = "host" WHERE services =~ /.$tag./

@alphacr
Copy link

alphacr commented Mar 22, 2019

Hi guys, i have a similar problem that I need help in, if anyone could help me on https://community.grafana.com/t/how-to-set-up-the-custom-tags-for-multi-value-in-grafana/15495 or
influxdata/influxdb#12809, it would be much appreciated

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

No branches or pull requests

8 participants