machine-controller icon indicating copy to clipboard operation
machine-controller copied to clipboard

Expose metrics for MachineDeployment status

Open embik opened this issue 2 years ago • 2 comments

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 avatar Feb 26 '24 11:02 embik

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

adberger avatar Apr 06 '24 19:04 adberger

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.

embik avatar Apr 06 '24 21:04 embik