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] Issue with detecting template variable dependency when query ends with variable #7354

Closed
cheribral opened this issue Jan 25, 2017 · 7 comments

Comments

@cheribral
Copy link

I am using grafana version 4.1.1-1484211277 with influx on CentOS 7, and am having trouble with a nested template variable.

I have one variable called pgstat which is used in 4 other variable queries. When I change $pgstat, 3 variables update, but one refuses to do so. The 'stat' variable seen below will not update. You can see the 3 top requests are updating the other variables. The remaining two queries are for the actual graphs.

The only difference is that $stat is a query for field keys rather than tag values. I'm not sure how, but could this cause the problem?

screenshot_2017-01-25_14-07-28

@torkelo
Copy link
Member

torkelo commented Jan 25, 2017

Can't replicate with the exact same setup.

image

@torkelo torkelo added the needs more info Issue needs more information, like query results, dashboard or panel json, grafana version etc label Jan 25, 2017
@torkelo torkelo closed this as completed Jan 25, 2017
@torkelo
Copy link
Member

torkelo commented Jan 25, 2017

can you show the options of the stat variable?

@cheribral
Copy link
Author

Sorry for the delay, I was away on holiday for a bit. The difference between your setup and mine is that the stat variable isn't "show tag values", it is "show field keys".

Here is a screenshot of the options:
screenshot_2017-02-13_17-22-18

@torkelo
Copy link
Member

torkelo commented Feb 13, 2017

that does not change anything :(

@cheribral
Copy link
Author

Apparently it does though ;)

Using the latest version, if I create a brand new dashboard with only two variables:

$pgmetric  show measurements
$stat	   show field keys from $pgmetric

Nothing happens when I change pgmetric. There is no request to the server to update the second variable.

If I change the second variable to:
show tag values from $pgmetric with key=schema
It makes a request every time I select something new in the first drop down.

@torkelo torkelo reopened this Feb 20, 2017
@torkelo torkelo added type/bug area/dashboard/templating and removed needs more info Issue needs more information, like query results, dashboard or panel json, grafana version etc labels Feb 20, 2017
@torkelo torkelo added this to the 4.2.0-beta1 milestone Feb 20, 2017
@torkelo torkelo changed the title [Bug] Nested template variable not updating [Bug] Issue with detecting template variable dependency when query ends with variable Feb 20, 2017
@torkelo
Copy link
Member

torkelo commented Feb 20, 2017

managed to replicate this issue, only occurs when the query ends with a variable. Fixed in master (and in soon to be released 4.2 beta)

@cheribral
Copy link
Author

cool, thanks torkelo

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

2 participants