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

How do I specify the value of a dashboard variable in a url when calling grafana-image-renderer? #383

Closed
rcowham opened this issue Nov 8, 2022 · 2 comments

Comments

@rcowham
Copy link

rcowham commented Nov 8, 2022

What would you like to be added:

I would like it to be implemented/documented how to render a specific Grafana dashboard panel when its containing dashboard has variables (and I want to render with something other than the default value of the variable!)

Why is this needed:

For automation of reports where there are variables in the containing dashboard.

@rcowham rcowham changed the title How do I specify the value of a dashboard variable in a url when calling grafana-image-rendered? How do I specify the value of a dashboard variable in a url when calling grafana-image-renderer? Nov 8, 2022
@joanlopez
Copy link
Collaborator

joanlopez commented Nov 23, 2022

Hi @rcowham,

Have you tried to specify the values of those variables in the URL?
It should work by passing the variables as URL parameters with the prefix var, like:
<url-to-your-dashboard>?var-host=myhost&var-instance=myinstance - for host and instance variables.

Thanks!

@rcowham
Copy link
Author

rcowham commented Nov 23, 2022

Thanks - that works.

@rcowham rcowham closed this as completed Nov 23, 2022
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

2 participants