kubernetes-monitoring / kubernetes-mixin

A set of Grafana dashboards and Prometheus alerts for Kubernetes.
Apache License 2.0
2.12k stars 597 forks source link

fix: Re-add cluster label to KubeStatefulSetUpdateNotRolledOut #967

Closed skl closed 2 months ago

skl commented 3 months ago

The alert KubeStatefulSetUpdateNotRolledOut was modified by the following PR:

The aggregation labels were changed and several were removed when refactoring from without to by:

I think the instance label is probably not useful, but job and cluster are certainly useful, so this PR proposes to bring them back.

Here are all the labels from the previous without version of the alert expression (my alert wasn't firing so I commented out the irrelevant parts of the PromQL just to see the underlying labels):

Screenshot 2024-08-28 at 14 20 01

Here is a test of the alert rule generated by this PR, which shows the job and cluster labels still intact whilst maintaining use of the by aggregation as suggested by the pint tool:

Screenshot 2024-08-28 at 14 20 33