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
auto-dashboards #41
auto-dashboards #41
Comments
I have been thinking about this and it is definitely something that should be added in some form. Just to clarify what you mean (so we are talking about the same thing). How would the filters array look and do you want to be able to specify a metric template / script function to apply customizations? Maybe something like this, if you save a graph with a template section [[server]] in a target then you could provide a special expand parameter array (either in the top filter section or as a querystring param) that would look for graphs containing a target with that template section and instead of replacing the template with the parameter (like the current template/filter feature works) duplicate the graph for each option in the array. So if you had a graph with a target like this: and you provided a template array server=[server-01, server-02, server-03, server-04] then you would end up with 4 graphs for each option in the array. Is this what you mean? |
Yes. This is what I mean. Thanks. |
Have a look at the scripted dashboard feature: https://github.com/torkelo/grafana/wiki/Scripted-dashboards |
I've been doing some hacking on taking a dashboard export (Save -> Advanced -> Export Schema) and massaging that into the scripted dashboard format. The use case is a bit different than what you have above: Instead of kicking out duplicate panels for multiple hosts in one dashboard, I am creating a host-specific dashboard and using the name parameter of the URL to dictate which host to display the dashboard for. For example: are the exact same dashboard, with the same panels, metrics, and layout. The only thing that changes is which host's metrics we show in the dashboard. Currently, the high-level process is:
Example use cases are:
When I get it to a sharable point (hopefully soon), would you prefer to just add the code to the Wiki, or do you want to keep it as part of the code base? My preference would be the latter, as I am sure it can be improved upon by others, but I am open to whatever you want. |
I am not really sure what you want to add to wiki/codebase, the python & javascript template that can transform a dashboard into a scripted dashboard? Your scenario sounds like you could use the built in templated dashboard feature (enable filtering in the dashboards settings / controls). In the end of this video I show how to create a templated dashboard: https://www.youtube.com/watch?v=OUvJamHeMpw |
Ah, I didn't realize that existed. Thanks for pointing it out and apologies for not watching the video before. Yes, that's nearly all of it - save the ability to specify the server by URL. The reason why that is important to me is it allows me to build URLs in other systems that would let them jump directly to a dashboard for that server. Please let me know if there's a way to pass a URL parameter into the filter. Otherwise, this fits the bill. Thanks again! |
Litmus flex update
Add basic diff endpoint and functionality
maint: Singlestat: Support Transparent
vendor/modules.txt: fix for Go 1.14
Nested yaml decoding
Hi. Grafana rocks! Can you add auto dashboard based on each field in filter? Example:
I can write some cronjob for updating dashboard in elasticsearch, but it is not clean.
Thanks!
The text was updated successfully, but these errors were encountered: