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

Expose metrics for MachineDeployment status #1767

Open
embik opened this issue Feb 26, 2024 · 8 comments · May be fixed by #1879
Open

Expose metrics for MachineDeployment status #1767

embik opened this issue Feb 26, 2024 · 8 comments · May be fixed by #1879
Assignees
Labels
customer-request kind/feature Categorizes issue or PR as related to a new feature. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management.

Comments

@embik
Copy link
Member

embik commented Feb 26, 2024

We need metrics to track MachineDeployments managed by this machine-controller over time. Primarily, the MachineDeployments' status information wrapped in metrics would be helpful, so something like:

  • machine_deployment_available_replicas
  • machine_deployment_ready_replicas
  • machine_deployment_replicas
  • machine_deployment_updated_replicas

With these metrics, alerts could be defined that e.g. alert on machine_deployment_replicas > machine_deployment_updated_replicas being true for more than 30 minutes (random example here).

@embik embik added customer-request kind/feature Categorizes issue or PR as related to a new feature. labels Feb 26, 2024
@adberger
Copy link

adberger commented Apr 6, 2024

@embik
Copy link
Member Author

embik commented Apr 6, 2024

For this use case https://github.com/kubernetes/kube-state-metrics/blob/main/docs/metrics/extend/customresourcestate-metrics.md could be enough?

That's definitely a way to implement metrics for these values if you need them, thank you for bringing up this option. At best, we expose those natively in future releases, but if you (as in you stumbled over this issue because you are missing those metrics) need this asap, the CRD solution from kube-state-metrics should help.

@csengerszabo csengerszabo added the sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. label Jul 11, 2024
@rajaSahil
Copy link

rajaSahil commented Nov 7, 2024

@embik Are there any plans to take this up?
I suppose we have to go ahead and write a simple exporter for this, or are there any other way to do it?

@embik
Copy link
Member Author

embik commented Nov 8, 2024

@rajaSahil machine-controller already has a metrics endpoint (see https://github.com/kubermatic/machine-controller/blob/main/cmd/machine-controller/main.go#L257 for the "entry point"). So we should just add more metrics there instead of writing a dedicated exporter.

@rajaSahil
Copy link

Okay.
@embik Can you assign this to me, I can take a look at it.

@embik
Copy link
Member Author

embik commented Nov 8, 2024

You can comment /assign to get it assigned to yourself, try it out! 😄

@rajaSahil
Copy link

Sure, thank you!

@rajaSahil
Copy link

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-request kind/feature Categorizes issue or PR as related to a new feature. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants