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

Feature request: more status metrics

Open YentlFrickx opened this issue 1 year ago • 3 comments

Currently the metrics on the kustomize-controller can't reliably be used to eg. automatically set a maintenance window during a deploy.

An idea to fix this would be to add some more possibilities: gotk_reconcile_condition{type="Ready", status="BuildError"}, in case of an error building the kustomization -> no actual changes were done gotk_reconcile_condition{type="Ready", status="Progressing"}, reconcile will be started but health check haven't passed yet (timeout wasn't reached yet) -> would be set before the actual reconcile starts

would these metrics be acceptable? If so I might implement them myself

YentlFrickx avatar Apr 07 '23 09:04 YentlFrickx

There is a discussion here on custom metrics https://github.com/fluxcd/flux2/discussions/3769#discussioncomment-5548442

stefanprodan avatar Apr 07 '23 09:04 stefanprodan

There is a discussion here on custom metrics fluxcd/flux2#3769 (comment)

Feature flag for such metrics would indeed be a good idea to not increase data too much, I just can really use some more detailed metrics in order to set our maintenance windows but don't want to start implementation if it won't be accepted.

YentlFrickx avatar Apr 07 '23 09:04 YentlFrickx

@YentlFrickx depending on the feedback from other maintainers, if we agree that this is a good idea, we'll have to create an RFC. The RFC must document all the custom metics that each controller should expose, only after the RFC is approved we can start working on the implementation.

stefanprodan avatar Apr 07 '23 10:04 stefanprodan

Adding the status reason to metrics and basically any other field from status is now possible. Docs here: https://fluxcd.io/flux/monitoring/custom-metrics/

stefanprodan avatar Apr 19 '24 15:04 stefanprodan