Skip to content

Commit 4cfb081

Browse files
committed
chore: adjust prometheus rule to use Accepted and Programmed conditions
1 parent fe936a7 commit 4cfb081

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

config/telemetry/nso-slo/prometheus-rules.yaml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,34 @@ metadata:
66
spec:
77
groups:
88
- name: nso-slo
9-
rules:
10-
- alert: GatewayStuckNotReadySLOViolation
9+
interval: 30s
10+
rules:
11+
- alert: GatewayNotReadySLOViolation
1112
expr: |
1213
(time() - datum_cloud_networking_gateway_created) > 60
13-
unless ignoring(type) (datum_cloud_networking_gateway_status{type="Ready"} == 1)
14+
unless ignoring(type) (
15+
(datum_cloud_networking_gateway_status{type="Accepted"} == 1) and
16+
(datum_cloud_networking_gateway_status{type="Programmed"} == 1)
17+
)
1418
for: 0s
1519
labels:
1620
severity: critical
1721
slo_violation: "true"
1822
annotations:
19-
summary: "Gateway {{ $labels.name }} is stuck for over 60 seconds without reaching Ready status"
20-
description: "Gateway {{ $labels.name }} in namespace {{ $labels.namespace }} has been in creation/transition state for {{ $value }} seconds without reaching Ready status, which exceeds the 60-second SLO threshold."
23+
summary: "Gateway {{ $labels.name }} is taking longer than 60 seconds to reach Ready status"
24+
description: "Gateway {{ $labels.name }} in namespace {{ $labels.namespace }} has been in creation state for {{ $value }} seconds without reaching Ready status (Accepted=True AND Programmed=True), which exceeds the 60-second SLO threshold."
2125

22-
- alert: GatewayNotReadySLOViolation
26+
- alert: GatewayDegradedSLOViolation
2327
expr: |
24-
(time() - datum_cloud_networking_gateway_status_condition_last_transition_time{type="Ready", status="False"}) > 60
28+
(
29+
(time() - datum_cloud_networking_gateway_status_condition_last_transition_time{type="Accepted", status="False"}) > 60
30+
) or (
31+
(time() - datum_cloud_networking_gateway_status_condition_last_transition_time{type="Programmed", status="False"}) > 60
32+
)
2533
for: 0s
2634
labels:
2735
severity: critical
2836
slo_violation: "true"
2937
annotations:
30-
summary: "Gateway {{ $labels.name }} has been not Ready for over 60 seconds"
31-
description: "Gateway {{ $labels.name }} in namespace {{ $labels.namespace }} has been in not Ready state for {{ $value }} seconds, which exceeds the 60-second SLO threshold."
38+
summary: "Gateway {{ $labels.name }} has been degraded for over 60 seconds"
39+
description: "Gateway {{ $labels.name }} in namespace {{ $labels.namespace }} has been in a degraded state (Accepted=False or Programmed=False) for {{ $value }} seconds without recovering, which exceeds the 60-second SLO threshold."

0 commit comments

Comments
 (0)