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

[enhancement] Improve dashboard query for kube-apiserver (and maybe others). #134

Open
Jeansen opened this issue Feb 1, 2025 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@Jeansen
Copy link

Jeansen commented Feb 1, 2025

Describe the enhancement you'd like

I suggest making the job label, e.g. for the Kubernetes API Server a variable that can be set during the kustomize call or make the hard-coded Regex more flexible.

For instance, there is the following query for the API Server:

up{job=~"kubernetes-apiservers|apiserver", cluster=~"$cluster"}

My API Server metrics us "kube-apiserver" for the job label. So, I cannot see this metric in the provided dashboard.

I'd suggest to make it look more like this:

up{job=~"(kube-|kubernetes-)*apiserver(s)*", cluster=~"k8s"}

This would match the following job labels:

  • kube-apiserver
  • kube-apiservers
  • kubernetes-apiserver
  • kuberntes-apiservers
  • apiserver
  • apiservers

Additional context

No response

@Jeansen Jeansen added the enhancement New feature or request label Feb 1, 2025
@Jeansen Jeansen changed the title [enhancement] [enhancement] Improve dashboard query for kube-apiserver (and maybe others). Feb 1, 2025
@dotdc
Copy link
Owner

dotdc commented Feb 6, 2025

Hi @Jeansen,

I agree, the current regex isn't very flexible...
How about creating a job variable for the k8s-system-api-server dashboard?
That should make it even more flexible!

Wdyt?

@Jeansen
Copy link
Author

Jeansen commented Feb 7, 2025

Hi @dotdc ,

That's a great idea! I just came up with the "quick fix". But having a job variable (which is also used in other dashboards) would be great. Currently I have a scenario where I play around with different dashboards, including yours, but also the Kubernetes Mixins and Boards from Grafana Mimir.

I believe it will be a swift PR on your side. I would declare myself still a rookie when it comes to Grafana dashboards, but I'd be happy to send you early feedback before merging into main.

@dotdc
Copy link
Owner

dotdc commented Feb 7, 2025

Sure, I'll do it.
Will let you know.

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

2 participants