Support for Variables
Brazier85 opened this issue · comments
+1
+1
+1
This feature is very much needed. Iam trying to aggregate data from multiple sources for a single host that id like be able to select from a list. I dont want to copy & pastet he same dashboard for each of the machines... Imagine if you change something and have to rework 100+ dashboards
Happy to have your thoughts/help on this PR #38
:-)
Really appreciate your PR, unfortunately several months old and still not merged
@cbmueller Please take a look at the PR, we need this feature.
Thanks for taking the time to participate. cbmueller is not working on the connector anymore.
In the background we are currently preparing the connector for the new Grafana API. It's more like a complete rewrite which has to be done because of changed APIs from the Grafana side. Once this is done and the existing features are working, we'll check out the feature requests and PRs.
We understand the need for this feature and will discuss it's priority internally.
Please confirm if this feature is available now on the new plugins.
Hi again,
as @LarsMichelsen also mentioned: We are aware, that this is a fundamental missing feature in the plugin. And even though, we currently do not know, when we will have the time to continue adding new features to this project, this one will be next.
Also, as we did most recently a complete rewrite of the plugin, we will add it to the new version instead of to the old one. This is important, especially regarding possible PRs.
As mentioned in other enhancement issues: We will come back to you, hopefully with good news and something to test. But please be patient with us as it may take some time.
Best Regards,
Marcel
Hi Marcel,
Any news on the variable support yet?
We are currently in requirements research for this feature. You can help us by answering the following question: How do you want to use variables with this data source? Please describe your use case as detailed as possible, so we can understand what you want to accomplish.
Example:
- Purpose: Quick overview of the most important metrics of a single host
- Variables:
- "Host" is a list of all hosts
- Dashboard:
- Panel "Memory"
- Filter Hostname: $Host
- Filter Service: "Memory"
- Template: "Active and Inactive Memory"
- Panel "CPU"
- Filter Hostname: $Host
- Filter Service: "CPU utilization"
- Template: "CPU utilization"
- Panel "Disks"
- similar to above
- Panel "Network"
- similar to above
- Panel "Memory"
Hi Benedikt,
On the Panel screen after selecting the CheckMK datasource, hostname is currently a drop down list, to select a list of hosts configured in CheckMK. We should be able to enter a variable here like $dbserver, then configure a variable on the dashboard that points $dbserver to the hostname, so that it resolves.
In our case we have hundreds of panels, so if we configure a new dashboard, or change a hostname, we need to go and touch every single panel and select the correct host name from the list, whereas previously we could just change the dashboard variables, and not have to touch any of the panels.
Hope this helps, let me know if you want more info.
Regards
Raymond
Hi @BenediktSeidl ,
we also need support for variables. Especially a hostname variable. In checkmk 2.1 there is already a server dashboard which shows the current performance of a system. We would like to recreate something like this in Grafana, especially with the selection of historical data. Currently, however, it looks as if it is not possible to use a variable for the hostname. So I always have to select the hostname manually in the query. I would like to be able to select a host directly in the grafana dashboard at the top via drop-down or text field + hostname auto completion and make the dashboard dynamic. We are using the checkmk enterprise Edition.
Regards
Christian
Hi @BenediktSeidl ,
As most of the people has pointed out, there will be great if we were able to use grafana variables onto the hostame or hostnameRegex fields on the checkMK plugin.
Here's the link to the official grafana plugin development documentation section that references how to implement this feature:
https://grafana.com/docs/grafana/latest/developers/plugins/add-support-for-variables/
Hope it helps.
Pau
Hi @BenediktSeidl,
Any update on this?
We are currently grandfathered in on our version of CheckMK, and we cannot upgrade until we get this functionality, so it is a bit of a security worry..
Regards
Raymond
it's definitely the next feature on our roadmap. i want to release the next beta of version 3.0.0 of the plugin this week, after that we will work on the variable support.
If you want to test the pre-alpha version of the plugin with variable support, you can so tribe-29-checkmk-datasource-3.0.1-alpha.1.testbuild.5079989444 (the plugin is zipped twice, sorry)
Please report any bugs or problems regarding the variables in this issue.
Currently supported variable types are site, host and service. If you need other variables, please report here and describe your use case.
Hi Benedikt,
Thanks, I have loaded the pre-alpha version.
Some comments: I selected CheckMK < 2.2 for the version of CheckMK, and the Raw Edition as we are running CheckMK 2.0.0p9, this tested fine!
Then when adding a panel, the Site dropdwon does not work, it does not list the current site, and i cannot type in this filed, it just says "Invalid ident: sites"
The hostname picks up the dashboard variables now, thank you!
Then I select the service, and single metric for the graph type, but the drop down for single metric, does not return only the counters for the single metric I selected, it seems to return all the counters available.
Let me know if you need any screenshots or similar.
Hi Benedikt,
I updated CheckMK to 2.2.0 and Grafana to 9.5.2, and everything works on the latest versions.
This is awesome!
Thank you :)
Nice to hear! I created a new internal note for changing the version dropdown to make it clear that 2.0.0 is not fully supported.
Great work.
I'm using checkmk 2.1p28 raw-edition and grafana 9.5.2
Everything seems to work
- fill variables using checkmk queries, with graphical filter definition (awsome)
- use variables in visualizations
This is quite exactly what I needed.
Thank you!
I just released 3.1.0-beta.1 which is the first (pre-)release with variable support: https://github.com/Checkmk/grafana-checkmk-datasource/releases/
As you may have noticed already, the support for variables is now fully implemented and released. We know this has been a long wanted and urgently needed feature and so, we want to thank all of you who participated during this process and for your patience. The input, not only in this particular issue, but on other platforms as well, has been of much value and gave us the ability to add actual value to the plugin.
So, how does this work exactly? I updated to the latest plugin version, could variables allow me to monitor uptimes of multiple hosts in a single dashboard without having to specify every host individually but with a regex instead?