Skip to content

Commit aca2e31

Browse files
committed
refine the alert expression
* Remove the "name" label which is removed in the metric * Use `last_over_time` to still get values after resetting
1 parent cde3e62 commit aca2e31

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

install/0000_90_cluster-version-operator_02_prometheusrule-TechPreviewNoUpgrade.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
description: The conditional update risk {{ "{{ $labels.risk }}" }} applies to the cluster, and the cluster update to a version exposed to the risk is not recommended. For more information refer to 'oc adm upgrade'.
2121
runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/cluster-monitoring-operator/OpenShiftUpdateRiskApplies.md
2222
expr: |
23-
max by (namespace, name, risk) (cluster_version_risk_conditions{job="cluster-version-operator", name="version", condition="Applies"} == 1)
23+
max by (namespace, risk) (last_over_time(cluster_version_risk_conditions{job="cluster-version-operator", condition="Applies"}[5m]) == 1)
2424
for: 10m
2525
labels:
2626
severity: warning

0 commit comments

Comments
 (0)