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

Support for Variables #28

Closed
Brazier85 opened this issue Dec 3, 2019 · 26 comments
Closed

Support for Variables #28

Brazier85 opened this issue Dec 3, 2019 · 26 comments
Labels
enhancement New feature or request

Comments

@Brazier85
Copy link

It would be nice if you can use variables in the provided fields eg. host. So it is possible to create dynamic dashboards with rows.

image

@cstegm
Copy link

cstegm commented Oct 28, 2020

+1

2 similar comments
@doctore74
Copy link

+1

@mpeuser
Copy link

mpeuser commented Oct 28, 2020

+1

@ruohki
Copy link
Contributor

ruohki commented Feb 1, 2021

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

amandahla pushed a commit to amandahla/grafana-checkmk-datasource that referenced this issue Feb 4, 2021
@amandahla
Copy link

Happy to have your thoughts/help on this PR #38

:-)

@rs-ubaldi
Copy link

Really appreciate your PR, unfortunately several months old and still not merged

@jeroenvermeulen
Copy link

@cbmueller Please take a look at the PR, we need this feature.

@LarsMichelsen
Copy link
Member

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.

@viramamur
Copy link

Please confirm if this feature is available now on the new plugins.

@godspeed-you
Copy link
Contributor

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

@sowdenraymond
Copy link

Hi Marcel,

Any news on the variable support yet?

@BenediktSeidl
Copy link
Contributor

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

@sowdenraymond
Copy link

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

@cf-rewe
Copy link

cf-rewe commented Sep 19, 2022

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

@paubartoli
Copy link

paubartoli commented Sep 29, 2022

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

@sowdenraymond
Copy link

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

@BenediktSeidl
Copy link
Contributor

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.

@BenediktSeidl
Copy link
Contributor

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.

@sowdenraymond
Copy link

sowdenraymond commented May 26, 2023

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.

@sowdenraymond
Copy link

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 :)

@BenediktSeidl
Copy link
Contributor

BenediktSeidl commented May 30, 2023

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.

@jsandner
Copy link

jsandner commented May 31, 2023

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!

@BenediktSeidl
Copy link
Contributor

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/

@godspeed-you
Copy link
Contributor

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.

@dnlldl
Copy link

dnlldl commented Jul 28, 2023

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?

@BenediktSeidl
Copy link
Contributor

please use the forum and tag it with grafana for general help questions regarding checkmk and grafana.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests