-
Notifications
You must be signed in to change notification settings - Fork 91
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
Feature request: All panels #42
Comments
btw, the reason this gives trouble is if a host has only 1 panel but the grafana settings want panels 1,2,3,4 it will query grafana for panels that dont exist which will result in a unresponsive webinterface untill grafana gives error and show no graph. |
I think this is not possible because the grafana curl api does not allow any variables in the url. works: http://icinga:3000/api/dashboards/db/icinga2-filesystems does not work: http://icinga:3000/api/dashboards/db/icinga2-filesystems?var-host=nfs02&var-filesystem=All I will have a look if anything else is possible |
Hi, with v1.2.0 there will be a link thats leads to a page with all service graphs of a host. Best regards, Carsten |
Sounds great, looking forward to see how you did it! Keep up the good work! |
Duplicate of #30 |
not duplicate btw, this would be a feature to show all graphs for a certain dashboard not a host. 2 different features |
i Know, but as long we cant get all panels via api from Grafana, there will be no solution for this issue. Maybe you open a feature request at the Grafana repository? |
yes that is true, I will have a look at it! |
got the following answer: The templating queries & variables and evaluation of repeated panels & rows is all done in the browser, so the api cannot return the info you want. |
Matches what i expected. So i can only give you the featrue to show all services of a host on one page. |
Not sure if it is relevant here, but the actual query used to get possible variable values is done by grafana-server to its backend. Grafana is definitely able to give you a list of host and services, if you have them as tags in InfluxDB (or any other grafana backend that can manage templating queries.). It is the interpolation of those results with the dashboard definition that's done in the browser (and gives you the number of rows and graphs and series in a graph, according to the various templating / repetition settings). |
indeed, lets do that and close this issue! @lesingo that was exactly what I was looking for, for example server01 has 1 filesystem and server02 has 2 filesystems. server01 will have 1 panel When I give the filesystem service in the grafana module panels 1,2 it will also try to pull panel 2 for server01 which it shouldnt. I thought it would be possible to use for example * and select all panels based on a variable in the url, but as stated by the grafana DEV in grafana/grafana#8434 it is indeed not possible because its done in the browser and not on server side. I guess this case can be closed, unfortunately. (I dont know how to solve this issue with current config) |
@p0nt I am not sure if I understood your original question correctly. If you want one graph per service, with all the performance data on it, even if you don't know how many performance data you get, that should be doable. As an example, think about filesystem space from the disk check, which you don't know beforehand how many filesystem you will have. You can repeat the query in a single graph using the group by feature. You can have a single graph with a query like this (InfluxDB example) |
thank you for your help @lesinigo, actually I wanted a different panel for each filesystem so this would not solve the problem. filesystems in 1 graph would be ok, but interface graphs with in/out metrics would not fix for that purpose. |
I have a similar problem with some of graphs. I have each value on perfdata On grafana i've created a $disk variable for splitting graphs If it's not possible to have all the grafana panelids, it is possible to repeat a defined variable for each perfdata value ( if i have 5 disks i have 5 graphs ) ? |
Thank you |
Thanks from me 2! |
Implemented with 777261f |
Screenshot for README.md? :) |
@dnsmichi its not easy to show it in one screenshot, but i added an example dashboard. |
I have just tested this, I can't seem to understand how this works. Settings: How it looks: As you can see there is allot of white space around the 2 graphs. What should I fill it at 'PanelId(s) *' to make this work? It gives 4 iframe's while there are only 2 graphs in that panel: |
I found it, there were only 2 graphs in the panel but for some reason they had id 2 and 3 which means he was showing id 0 and 1 also but they were non existant |
@p0nt see the example dashboard to get an idea how this showld work.
and in you panel you have a query
Now you can repeat the row or the panel for $perf. The module will then load all the panels that grafana will auto generate. Pic before the auto repeat will hit: And now with auto repeat This works no matter how many metrics are there. |
Would love to see a wildcard possibility with the "PanelId(s)" option.
For example I have a dashboard with the following templatings:
$host = SHOW TAG VALUES FROM "filesystems" WITH KEY = "hostname"
$filesystem = SHOW TAG VALUES FROM "filesystems" WITH KEY = "metric" WHERE hostname =~ /$host/
Which means for each host there is a different number of panels available for this dashboard, and because its hardcoded now I can not use the grafana module for this specific dashboard.
If a wildcard (*) option would exist, it would check with grafana how many panels there are and just show them all.
Currently I have a very ugly way with my hacked grafana graph version to loop through the dashboard this way:
/usr/bin/curl http://icinga:3000/api/dashboards/db/icinga2-filesystems 2> /dev/null | python -m json.tool | sed -n -e '/panels/,$p'| grep '"id"' | grep -o [0-9]*
This will list the panel numbers:
root@icinga:/# /usr/bin/curl http://icinga:3000/api/dashboards/db/icinga2-filesystems 2> /dev/null | python -m json.tool | sed -n -e '/panels/,$p'| grep '"id"' | grep -o [0-9]*
1
2
3
4
5
6
7
8
Maybe you are able to find a better and easier way to query grafana for this information?
The text was updated successfully, but these errors were encountered: