kubermatic / machine-controller

Apache License 2.0
309 stars 131 forks source link

Expose metrics for MachineDeployment status #1767

Open embik opened 9 months ago

embik commented 9 months ago

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:

adberger commented 8 months ago

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

embik commented 8 months ago

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.

rajaSahil commented 3 weeks ago

@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 commented 3 weeks ago

@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 commented 3 weeks ago

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

embik commented 3 weeks ago

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

rajaSahil commented 3 weeks ago

Sure, thank you!

rajaSahil commented 3 weeks ago

/assign