Skip to content

Commit 5cef4c5

Browse files
Prithviraj Patilcursoragent
authored andcommitted
fix(alerts): correct DiskBufferUsage template variable and severity casing
The DiskBufferUsage alert summary uses $labels.hostname without Go template braces, causing the literal string "$labels.hostname" to be displayed instead of the actual node hostname. Additionally, the severity label uses "Warning" (capital W) while all other logging alerts use lowercase. Fix: - Wrap $labels.hostname in {{ }} template braces in the summary - Change severity from "Warning" to "warning" for consistency Ref: https://redhat.atlassian.net/browse/LOG-9461 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 218eb4a commit 5cef4c5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

bundle/manifests/collector_monitoring.coreos.com_v1_prometheusrule.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ spec:
8686
annotations:
8787
description: 'Collectors potentially consuming too much node disk, {{ $value
8888
}}% '
89-
summary: Detected consuming too much node disk on $labels.hostname host
89+
summary: Detected consuming too much node disk on {{ $labels.hostname }} host
9090
expr: "(label_replace(sum by(hostname) (vector_buffer_byte_size{component_kind='sink',
9191
buffer_type='disk'}), 'instance', '$1', 'hostname', '(.*)') \n/ on(instance)
9292
group_left() sum by(instance) (node_filesystem_size_bytes{mountpoint='/var'}))
9393
* 100 > 15\n"
9494
for: 5m
9595
labels:
9696
service: collector
97-
severity: Warning
97+
severity: warning
9898
- alert: CollectorSourceDiscardedLogs
9999
annotations:
100100
description: |-

config/prometheus/collector_alerts.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ spec:
8080
- alert: DiskBufferUsage
8181
annotations:
8282
description: "Collectors potentially consuming too much node disk, {{ $value }}% "
83-
summary: "Detected consuming too much node disk on $labels.hostname host"
83+
summary: "Detected consuming too much node disk on {{ $labels.hostname }} host"
8484
expr: |
8585
(label_replace(sum by(hostname) (vector_buffer_byte_size{component_kind='sink', buffer_type='disk'}), 'instance', '$1', 'hostname', '(.*)')
8686
/ on(instance) group_left() sum by(instance) (node_filesystem_size_bytes{mountpoint='/var'})) * 100 > 15
8787
for: 5m
8888
labels:
8989
service: collector
90-
severity: Warning
90+
severity: warning
9191
- alert: CollectorSourceDiscardedLogs
9292
annotations:
9393
description: |-

0 commit comments

Comments
 (0)