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

Grafana template variables not working for the Default datasource #242

Closed
ngleader opened this issue Dec 3, 2021 · 6 comments · Fixed by #245
Closed

Grafana template variables not working for the Default datasource #242

ngleader opened this issue Dec 3, 2021 · 6 comments · Fixed by #245
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ngleader
Copy link

ngleader commented Dec 3, 2021

Describe the bug

can not load template variables by redis query.

Version

  • grafana 8.1.0, 8.3.0
  • redis-datasource 2.0.0

Steps to reproduce

  1. setup redis datasource
  2. create redis sets item & add value
  3. make grafana template variable with query "smembers mykey" or "get mykey2"
  4. Preview of values : None => not working

Expected behavior

Screenshots

Additional context

image

@mikhail-vl mikhail-vl self-assigned this Dec 3, 2021
@mikhail-vl mikhail-vl added the question Further information is requested label Dec 3, 2021
@mikhail-vl
Copy link
Contributor

@ngleader, do you see any errors in the Browser Console?

Are you able to create a panel with the get or smembers command and display values on your dashboard?

I will check on my test environment.

@mikhail-vl
Copy link
Contributor

@ngleader, I remember 8.1.X had issues with loading Variables for Default Data Source, which was fixed in 8.2.X. Let me check what happened in 8.3.0.

@mikhail-vl
Copy link
Contributor

@ngleader, I just tested on the 8.3.0 and everything is working as expected.

Please let me know if you see any issues in the Browser Console.

@ngleader
Copy link
Author

ngleader commented Dec 5, 2021

@mikhailredis

datasource

image

test smembers

image

setting variables

image
image

my redis plugin

image
image
image

version

redis cluster(redis 6.2.6)
image

@mikhail-vl mikhail-vl added bug Something isn't working and removed question Further information is requested labels Dec 5, 2021
@mikhail-vl mikhail-vl added this to the Version 2.1.0 milestone Dec 5, 2021
@mikhail-vl
Copy link
Contributor

@ngleader It's the same issue with variables when the data source is set as Default. I just reproduced the issue on 8.3.0.

Could you please unset 'Default' and it should work as expected?

I will check the code and investigate with the Grafana team if necessary.

@mikhail-vl mikhail-vl changed the title grafana template variables not working. Grafana template variables not working for the Default datasource Dec 5, 2021
@mikhail-vl
Copy link
Contributor

@ngleader Thank you for opening the issue. The bug is fixed and will be a part of the upcoming release.
Meanwhile, variables should work for the Redis data source not marked as Default.

Please let me know if there is anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants