Skip to content

Commit 894aa67

Browse files
authored
[alerts] add per-cluster Mimir rule namespaces + alert routing labels (#709)
**Context:** After updating the key, we're now able to see the alerts in Grafana, with examples of the following form: ``` alloy/monitoring/arc-alerts/<SOME_HASH> ... ``` I'm noticing the following issues: 1. these alerts seem to be constantly created/destroyed: *Failed to load rules from group arc in alloy...* after clicking on such a rule in the UI. 2. there are multiple copies. Each cluster seems to emit their own version: `alloy/monitoring/gpu-alerts/<SOME_HASH_1, SOME_HASH_2>`, and this seems to contest. To address this: - set mimir_namespace_prefix to the cluster name so clusters stop contesting/recreating each other's rules in the shared Mimir tenant. New name should be `<CLUSTER_NAME>/monitoring/arc-alerts/<SOME_HASH>` - alerts: add team=pytorch-dev-infra-osdc to all rules and priority=P1 to critical rules, for the alerting-infra issue pipeline. The label pytorch-dev-infra was not directly chosen since that would automatically flag it with treehugger. After this change, I'm going to add the delivery system wiring for one of the clusters and a subset of the alerts. Afterwards, the label can be updated if all succeeds. ``` just lint && just test ```
1 parent b59d14e commit 894aa67

9 files changed

Lines changed: 41 additions & 0 deletions

osdc/modules/monitoring/helm/alloy-values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ alloy:
114114
mimir.rules.kubernetes "grafana_cloud" {
115115
address = env("GCLOUD_BASE_URL")
116116
tenant_id = env("GCLOUD_RW_API_USER")
117+
mimir_namespace_prefix = env("CLUSTER_NAME")
117118
118119
basic_auth {
119120
username = env("GCLOUD_RW_API_USER")

osdc/modules/monitoring/kubernetes/alerts/arc-alerts.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ spec:
1414
for: 15m
1515
labels:
1616
severity: critical
17+
team: pytorch-dev-infra
18+
priority: P3
1719
annotations:
1820
summary: "ARC listener stalled — jobs queued but no progress"
1921
description: "ARC listener has {{ $value }} assigned jobs but the assignment rate has been zero for 15 minutes. Runners may not be picking up new jobs."

osdc/modules/monitoring/kubernetes/alerts/gpu-alerts.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ spec:
1414
for: 1m
1515
labels:
1616
severity: critical
17+
team: pytorch-dev-infra
18+
priority: P3
1719
annotations:
1820
summary: "GPU {{ $labels.gpu }} on {{ $labels.node }} has double-bit ECC errors"
1921
description: "GPU {{ $labels.gpu }} ({{ $labels.device }}) on node {{ $labels.node }} has new uncorrectable double-bit ECC errors. This GPU should be taken out of service."
@@ -23,6 +25,8 @@ spec:
2325
for: 1m
2426
labels:
2527
severity: critical
28+
team: pytorch-dev-infra
29+
priority: P3
2630
annotations:
2731
summary: "GPU {{ $labels.gpu }} on {{ $labels.node }} has critical XID error {{ $value }}"
2832
description: "GPU {{ $labels.gpu }} reported XID error {{ $value }} (48=DBE, 79=GPU fallen off bus, 94/95=NVLink errors). Immediate investigation required."
@@ -32,6 +36,8 @@ spec:
3236
for: 1m
3337
labels:
3438
severity: critical
39+
team: pytorch-dev-infra
40+
priority: P3
3541
annotations:
3642
summary: "GPU {{ $labels.gpu }} on {{ $labels.node }} has row remap failure"
3743
description: "GPU {{ $labels.gpu }} has a failed row remap, indicating irreparable memory damage. This GPU should be replaced."
@@ -41,6 +47,8 @@ spec:
4147
for: 5m
4248
labels:
4349
severity: critical
50+
team: pytorch-dev-infra
51+
priority: P3
4452
annotations:
4553
summary: "GPU {{ $labels.gpu }} on {{ $labels.node }} temperature critical ({{ $value }}°C)"
4654
description: "GPU {{ $labels.gpu }} temperature has exceeded 95°C for 5 minutes. Sustained high temperatures cause throttling and hardware damage."

osdc/modules/monitoring/kubernetes/alerts/harbor-cache-recovery-alerts.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ spec:
2525
for: 15m
2626
labels:
2727
severity: critical
28+
team: pytorch-dev-infra
29+
priority: P3
2830
annotations:
2931
summary: "harbor-cache-recovery cronjob is failing"
3032
description: >-
@@ -56,6 +58,8 @@ spec:
5658
for: 10m
5759
labels:
5860
severity: warning
61+
team: pytorch-dev-infra
62+
priority: P3
5963
annotations:
6064
summary: "harbor-cache-recovery pod was OOMKilled"
6165
description: >-
@@ -78,6 +82,8 @@ spec:
7882
for: 5m
7983
labels:
8084
severity: warning
85+
team: pytorch-dev-infra
86+
priority: P3
8187
annotations:
8288
summary: "harbor-cache-recovery has not completed successfully in >30m"
8389
description: >-

osdc/modules/monitoring/kubernetes/alerts/infrastructure-alerts.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ spec:
1414
for: 5m
1515
labels:
1616
severity: critical
17+
team: pytorch-dev-infra
18+
priority: P3
1719
annotations:
1820
summary: "Node {{ $labels.node }} is NotReady"
1921
description: "Node {{ $labels.node }} has been in NotReady state for more than 5 minutes."
@@ -24,6 +26,8 @@ spec:
2426
for: 15m
2527
labels:
2628
severity: critical
29+
team: pytorch-dev-infra
30+
priority: P3
2731
annotations:
2832
summary: "Pod {{ $labels.namespace }}/{{ $labels.pod }} is crash-looping"
2933
description: "Container {{ $labels.container }} in pod {{ $labels.namespace }}/{{ $labels.pod }} has restarted {{ $value }} times in the last hour."
@@ -33,6 +37,8 @@ spec:
3337
for: 5m
3438
labels:
3539
severity: critical
40+
team: pytorch-dev-infra
41+
priority: P3
3642
annotations:
3743
summary: "Harbor is down"
3844
description: "Harbor scrape target {{ $labels.instance }} has been down for more than 5 minutes. Image pulls through the proxy cache will fail."
@@ -45,6 +51,8 @@ spec:
4551
for: 15m
4652
labels:
4753
severity: critical
54+
team: pytorch-dev-infra
55+
priority: P3
4856
annotations:
4957
summary: "Karpenter creating nodeclaims but no nodes joining"
5058
description: "Karpenter has created nodeclaims in the last 15 minutes but no new nodes have joined the cluster. Nodes may be failing to register."

osdc/modules/monitoring/kubernetes/alerts/network-pressure-alerts.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ spec:
1414
for: 5m
1515
labels:
1616
severity: warning
17+
team: pytorch-dev-infra
18+
priority: P3
1719
annotations:
1820
summary: "Node conntrack table > 80% full ({{ $labels.node }})"
1921
description: |
@@ -27,6 +29,8 @@ spec:
2729
for: 2m
2830
labels:
2931
severity: critical
32+
team: pytorch-dev-infra
33+
priority: P3
3034
annotations:
3135
summary: "Node conntrack table > 95% full — imminent connection drops ({{ $labels.node }})"
3236
description: |
@@ -43,6 +47,8 @@ spec:
4347
for: 10m
4448
labels:
4549
severity: warning
50+
team: pytorch-dev-infra
51+
priority: P3
4652
annotations:
4753
summary: "node_nf_conntrack_entries metric is missing — conntrack alerts inert"
4854
description: |

osdc/modules/monitoring/kubernetes/alerts/node-compactor-alerts.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ spec:
1414
for: 15m
1515
labels:
1616
severity: critical
17+
team: pytorch-dev-infra
18+
priority: P3
1719
annotations:
1820
summary: "Node compactor reconciliation is failing persistently"
1921
description: "The node-compactor in namespace {{ $labels.namespace }} has had continuous reconciliation errors for 15 minutes. Burst-absorption (untainting nodes under scheduling pressure) is offline. Check for expired SA tokens (401) or RBAC issues."

osdc/modules/monitoring/kubernetes/alerts/nodelocaldns-alerts.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ spec:
1414
for: 5m
1515
labels:
1616
severity: critical
17+
team: pytorch-dev-infra
18+
priority: P3
1719
annotations:
1820
summary: "NodeLocal DNSCache setup errors on {{ $labels.pod }}"
1921
description: |
@@ -26,6 +28,8 @@ spec:
2628
for: 10m
2729
labels:
2830
severity: warning
31+
team: pytorch-dev-infra
32+
priority: P3
2933
annotations:
3034
summary: "NodeLocal DNSCache pod restarting"
3135
description: |
@@ -38,6 +42,8 @@ spec:
3842
for: 15m
3943
labels:
4044
severity: warning
45+
team: pytorch-dev-infra
46+
priority: P3
4147
annotations:
4248
summary: "NodeLocal DNSCache DaemonSet has unavailable pods"
4349
description: |

osdc/modules/monitoring/kubernetes/alerts/zombie-cleanup-alerts.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ spec:
1414
for: 5m
1515
labels:
1616
severity: warning
17+
team: pytorch-dev-infra
18+
priority: P3
1719
annotations:
1820
summary: "Zombie cleanup cap reached — zombies deferred"
1921
description: >-

0 commit comments

Comments
 (0)