Skip to content

Commit 89cb731

Browse files
fix(operator): use description annotation for Prometheus alerts instead of message (#16574)
1 parent bbfdc36 commit 89cb731

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

‎operator/internal/manifests/internal/alerts/prometheus-alerts.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ groups:
44
rules:
55
- alert: LokiRequestErrors
66
annotations:
7-
message: |-
7+
description: |-
88
{{ $labels.job }} {{ $labels.route }} is experiencing {{ printf "%.2f" $value }}% errors.
99
summary: "At least 10% of requests are responded by 5xx server errors."
1010
runbook_url: "[[ .RunbookURL ]]#Loki-Request-Errors"
@@ -23,7 +23,7 @@ groups:
2323
severity: critical
2424
- alert: LokiStackWriteRequestErrors
2525
annotations:
26-
message: |-
26+
description: |-
2727
{{ printf "%.2f" $value }}% of write requests from {{ $labels.job }} in {{ $labels.namespace }} are returned with server errors.
2828
summary: "At least 10% of write requests to the lokistack-gateway are responded with 5xx server errors."
2929
runbook_url: "[[ .RunbookURL ]]#LokiStack-Write-Request-Errors"
@@ -42,7 +42,7 @@ groups:
4242
severity: critical
4343
- alert: LokiStackReadRequestErrors
4444
annotations:
45-
message: |-
45+
description: |-
4646
{{ printf "%.2f" $value }}% of query requests from {{ $labels.job }} in {{ $labels.namespace }} are returned with server errors.
4747
summary: "At least 10% of query requests to the lokistack-gateway are responded with 5xx server errors."
4848
runbook_url: "[[ .RunbookURL ]]#LokiStack-Read-Request-Errors"
@@ -61,7 +61,7 @@ groups:
6161
severity: critical
6262
- alert: LokiRequestPanics
6363
annotations:
64-
message: |-
64+
description: |-
6565
{{ $labels.job }} is experiencing an increase of {{ $value }} panics.
6666
summary: "A panic was triggered."
6767
runbook_url: "[[ .RunbookURL ]]#Loki-Request-Panics"
@@ -76,7 +76,7 @@ groups:
7676
severity: critical
7777
- alert: LokiRequestLatency
7878
annotations:
79-
message: |-
79+
description: |-
8080
{{ $labels.job }} {{ $labels.route }} is experiencing {{ printf "%.2f" $value }}s 99th percentile latency.
8181
summary: "The 99th percentile is experiencing high latency (higher than 1 second)."
8282
runbook_url: "[[ .RunbookURL ]]#Loki-Request-Latency"
@@ -94,7 +94,7 @@ groups:
9494
severity: critical
9595
- alert: LokiTenantRateLimit
9696
annotations:
97-
message: |-
97+
description: |-
9898
{{ $labels.job }} {{ $labels.route }} is experiencing 429 errors.
9999
summary: "At least 10% of requests are responded with the rate limit error code."
100100
runbook_url: "[[ .RunbookURL ]]#Loki-Tenant-Rate-Limit"
@@ -113,7 +113,7 @@ groups:
113113
severity: warning
114114
- alert: LokiStorageSlowWrite
115115
annotations:
116-
message: |-
116+
description: |-
117117
The storage path is experiencing slow write response rates.
118118
summary: "The storage path is experiencing slow write response rates."
119119
runbook_url: "[[ .RunbookURL ]]#Loki-Storage-Slow-Write"
@@ -129,7 +129,7 @@ groups:
129129
severity: warning
130130
- alert: LokiStorageSlowRead
131131
annotations:
132-
message: |-
132+
description: |-
133133
The storage path is experiencing slow read response rates.
134134
summary: "The storage path is experiencing slow read response rates."
135135
runbook_url: "[[ .RunbookURL ]]#Loki-Storage-Slow-Read"
@@ -145,7 +145,7 @@ groups:
145145
severity: warning
146146
- alert: LokiWritePathHighLoad
147147
annotations:
148-
message: |-
148+
description: |-
149149
The write path is experiencing high load.
150150
summary: "The write path is experiencing high load, causing backpressure storage flushing."
151151
runbook_url: "[[ .RunbookURL ]]#Loki-Write-Path-High-Load"
@@ -159,7 +159,7 @@ groups:
159159
severity: warning
160160
- alert: LokiReadPathHighLoad
161161
annotations:
162-
message: |-
162+
description: |-
163163
The read path is experiencing high load.
164164
summary: "The read path has high volume of queries, causing longer response times."
165165
runbook_url: "[[ .RunbookURL ]]#Loki-Read-Path-High-Load"
@@ -177,7 +177,7 @@ groups:
177177
severity: warning
178178
- alert: LokiDiscardedSamplesWarning
179179
annotations:
180-
message: |-
180+
description: |-
181181
Loki in namespace {{ $labels.namespace }} is discarding samples in the "{{ $labels.tenant }}" tenant during ingestion.
182182
Samples are discarded because of "{{ $labels.reason }}" at a rate of {{ .Value | humanize }} samples per second.
183183
summary: Loki is discarding samples during ingestion because they fail validation.
@@ -195,7 +195,7 @@ groups:
195195
severity: warning
196196
- alert: LokistackSchemaUpgradesRequired
197197
annotations:
198-
message: |-
198+
description: |-
199199
The LokiStack "{{ $labels.stack_name }}" in namespace "{{ $labels.stack_namespace }}" is using a storage schema
200200
configuration that does not contain the latest schema version. It is recommended to update the schema
201201
configuration to update the schema version to the latest version in the future.

‎operator/internal/manifests/internal/alerts/testdata/test.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ tests:
7777
severity: critical
7878
exp_annotations:
7979
summary: "At least 10% of requests are responded by 5xx server errors."
80-
message: "ingester my-route is experiencing 20.48% errors."
80+
description: "ingester my-route is experiencing 20.48% errors."
8181
runbook_url: "[[ .RunbookURL ]]#Loki-Request-Errors"
8282
- eval_time: 16m
8383
alertname: LokiStackWriteRequestErrors
@@ -88,7 +88,7 @@ tests:
8888
severity: critical
8989
exp_annotations:
9090
summary: "At least 10% of write requests to the lokistack-gateway are responded with 5xx server errors."
91-
message: "25.76% of write requests from gateway in my-ns are returned with server errors."
91+
description: "25.76% of write requests from gateway in my-ns are returned with server errors."
9292
runbook_url: "[[ .RunbookURL ]]#LokiStack-Write-Request-Errors"
9393
- eval_time: 16m
9494
alertname: LokiStackReadRequestErrors
@@ -99,7 +99,7 @@ tests:
9999
severity: critical
100100
exp_annotations:
101101
summary: "At least 10% of query requests to the lokistack-gateway are responded with 5xx server errors."
102-
message: "25.76% of query requests from gateway in my-ns are returned with server errors."
102+
description: "25.76% of query requests from gateway in my-ns are returned with server errors."
103103
runbook_url: "[[ .RunbookURL ]]#LokiStack-Read-Request-Errors"
104104
- eval_time: 10m
105105
alertname: LokiRequestPanics
@@ -110,7 +110,7 @@ tests:
110110
severity: critical
111111
exp_annotations:
112112
summary: "A panic was triggered."
113-
message: "ingester is experiencing an increase of 2 panics."
113+
description: "ingester is experiencing an increase of 2 panics."
114114
runbook_url: "[[ .RunbookURL ]]#Loki-Request-Panics"
115115
- eval_time: 16m
116116
alertname: LokiRequestLatency
@@ -122,7 +122,7 @@ tests:
122122
severity: critical
123123
exp_annotations:
124124
summary: "The 99th percentile is experiencing high latency (higher than 1 second)."
125-
message: "ingester my-route is experiencing 9.90s 99th percentile latency."
125+
description: "ingester my-route is experiencing 9.90s 99th percentile latency."
126126
runbook_url: "[[ .RunbookURL ]]#Loki-Request-Latency"
127127
- eval_time: 16m
128128
alertname: LokiTenantRateLimit
@@ -134,7 +134,7 @@ tests:
134134
severity: warning
135135
exp_annotations:
136136
summary: "At least 10% of requests are responded with the rate limit error code."
137-
message: "ingester my-route is experiencing 429 errors."
137+
description: "ingester my-route is experiencing 429 errors."
138138
runbook_url: "[[ .RunbookURL ]]#Loki-Tenant-Rate-Limit"
139139
- eval_time: 16m
140140
alertname: LokiStorageSlowWrite
@@ -145,7 +145,7 @@ tests:
145145
severity: warning
146146
exp_annotations:
147147
summary: "The storage path is experiencing slow write response rates."
148-
message: "The storage path is experiencing slow write response rates."
148+
description: "The storage path is experiencing slow write response rates."
149149
runbook_url: "[[ .RunbookURL ]]#Loki-Storage-Slow-Write"
150150
- eval_time: 16m
151151
alertname: LokiStorageSlowRead
@@ -156,7 +156,7 @@ tests:
156156
severity: warning
157157
exp_annotations:
158158
summary: "The storage path is experiencing slow read response rates."
159-
message: "The storage path is experiencing slow read response rates."
159+
description: "The storage path is experiencing slow read response rates."
160160
runbook_url: "[[ .RunbookURL ]]#Loki-Storage-Slow-Read"
161161
- eval_time: 16m
162162
alertname: LokiWritePathHighLoad
@@ -167,7 +167,7 @@ tests:
167167
severity: warning
168168
exp_annotations:
169169
summary: "The write path is experiencing high load, causing backpressure storage flushing."
170-
message: "The write path is experiencing high load."
170+
description: "The write path is experiencing high load."
171171
runbook_url: "[[ .RunbookURL ]]#Loki-Write-Path-High-Load"
172172
- eval_time: 16m
173173
alertname: LokiReadPathHighLoad
@@ -178,7 +178,7 @@ tests:
178178
severity: warning
179179
exp_annotations:
180180
summary: "The read path has high volume of queries, causing longer response times."
181-
message: "The read path is experiencing high load."
181+
description: "The read path is experiencing high load."
182182
runbook_url: "[[ .RunbookURL ]]#Loki-Read-Path-High-Load"
183183
- eval_time: 22m
184184
alertname: LokiDiscardedSamplesWarning
@@ -189,7 +189,7 @@ tests:
189189
severity: warning
190190
reason: line_too_long
191191
exp_annotations:
192-
message: |-
192+
description: |-
193193
Loki in namespace my-ns is discarding samples in the "application" tenant during ingestion.
194194
Samples are discarded because of "line_too_long" at a rate of 2 samples per second.
195195
summary: Loki is discarding samples during ingestion because they fail validation.

0 commit comments

Comments
 (0)