-
Notifications
You must be signed in to change notification settings - Fork 373
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
[enhancement] cluster variable support #15
Comments
Hi @tesharp, you can achieve this by using the Datasource variable; just configure each of your clusters as datasources. |
Hi @dotdc , first of I really think this is great stuff. Came here from your Medium post, and I'm glad some of us show that FR people can do stuffs too :) Anyway, even though you're right for Datasources, there is the use-case of people using a Prom federation, or who uses tools like Thanos (even Grafana Mimir but I haven't tried it) in order to achieve global monitoring of several clusters from the same point. I was about to open an issue before finding this one, I'm keen to propose a PR adding a cluster var and let you decide whether or not you want to integrate it, wdyt ? |
Thank you @cebidhem! I don't think you can create a PromQL query with an optional label, if any of you know a way of doing this, I'm really interested. |
It makes completely sense. I'll probably fork the project and add the variable in our project, at least for now. |
I'd be happy to include this feature if you make a tool or script that injects the necessary variables and labels to the dashboards. This way, everyone will benefit from your work and it will also be easier for you to update. |
We could use GitHub Actions to publish a set of new dashboards, maybe prefixed with That way, it would be possible to have both types of dashboards in the same repo, and even publish both version on Grafana. I've never really work with Actions as I'm mostly using GitLab, but I could give it a try. I guess a quite simple working solution could be a shell script doing some |
That was the idea, if you create a tool that can inject the labels & variables in the script, I will make a special release for them. |
@dotdc how about usage of jsonnet? I can prepare changes if you are fine with the approach |
Hi @k1rk, The only requirement I have is that the source must remain flat JSON Grafana dashboards. Let me know. |
Did anyone manage to script this? Would love to add the functionality for multi-cluster support. Excellent dashboards btw, thanks! |
I have same issue, too.. |
Hi @keith-e-munro, I don't think anyone did it yet, but we can discuss the topic further if you're willing to do it. I personally use one datasource per cluster, even when using Thanos, so I don't have to rely on the cluster variable. |
First of all, very nice set of dashboards 👏 . Not sure if I have all the context, but non-existing labels should not break the query, at least not in recent versions of Prometheus e.g. > 2.45.0 (could not find whether this was a fix at some point); so adding a variable with default empty value and a label like |
This is really interesting @mihaico, just tested on 2.46.0 and it works! We could pick this solution if the change is old enough, otherwise I would wait a little because 2.45.0 will probably be a bit too recent for most users. |
Hi @AndrisJrs, There is no differentiating label for Kubernetes nodes here. In order to keep the issue on topic, please open a dedicated issue if you want to discuss it further. |
@dotdc I retest this in Promtheus 2.0.0 ( |
Sorry for the delay, I know this has been asked for quite some time. @jkroepke thank you for this input, I think it's safe enough to give it a shot. |
Just added the cluster variable in If anyone has time to try it, and let me know if it works on your side. |
I give some feedback on PR |
Thank you @jkroepke, just made the according change 👍 |
Just did the namespaces, nodes and pods views (#82). |
Hi @AndrisJrs, you can add this label using |
True, made the change in #84 |
Hi @dotdc, Thanks for the tip. It works fine without label. I wanted to see whether it will fix non-kubernetes node-exporters leaking into dashboard like I reported earlier in this thread. |
Just merged #90 with the missing dashboards. 🎉 Please open a new issue if you see any bugs related to this. Thank you all for your ideas ! |
🎉 This issue has been resolved in version 1.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Thanks for very nice dashboards.
One thing missing is a variable "cluster" maybe. Having multiple clusters it is useful to limit scope to a single cluster. A multi-select variable accepting all and queries adding
"cluster=~"$cluster"
.The text was updated successfully, but these errors were encountered: