This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 169
/
alerts.yaml
375 lines (375 loc) · 14.2 KB
/
alerts.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
# Note: Alert thresholds are experimental. Feel free to change them or suggest back at
# Promscale channel in TimescaleDB slack.
groups:
- name: promscale-general
rules:
- alert: PromscaleDown
expr: absent(up{job=~".*promscale.*"})
labels:
severity: critical
annotations:
summary: Promscale is down.
description: "{{ $labels.instance }} of job {{ $labels.job }} is down."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleDown.md
- name: promscale-ingest
rules:
- alert: PromscaleIngestHighErrorRate
expr: |
(
sum by (job, instance, namespace, type) (
rate(promscale_ingest_requests_total{code=~"5.."}[5m])
)
/
sum by (job, instance, namespace, type) (
rate(promscale_ingest_requests_total[5m])
)
) > 0.05
labels:
severity: warning
annotations:
summary: High error rate in Promscale ingestion.
description: "Promscale ingestion is having a {{ $value | humanizePercentage }} error rate."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleIngestHighErrorRate.md
- alert: PromscaleIngestHighErrorRate
expr: |
(
sum by (job, instance, namespace, type) (
rate(promscale_ingest_requests_total{code=~"5.."}[5m])
)
/
sum by (job, instance, namespace, type) (
rate(promscale_ingest_requests_total[5m])
)
) > 0.1
labels:
severity: critical
annotations:
summary: High error rate in Promscale ingestion.
description: "Promscale ingestion is having a {{ $value | humanizePercentage }} error rate."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleIngestHighErrorRate.md
- alert: PromscaleIngestHighLatency
expr: |
(
histogram_quantile(
0.90,
sum by (job, instance, namespace, type, le) (
rate(promscale_ingest_duration_seconds_bucket[5m])
)
) > 10
and
sum by (job, instance, namespace, type) (
rate(promscale_ingest_duration_seconds_bucket[5m])
)
) > 0
for: 5m
labels:
severity: warning
annotations:
summary: Slow Promscale ingestion.
description: "Slowest 10% of ingestion batch took more than {{ $value | humanizeDuration }} seconds to ingest."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleIngestHighLatency.md
- alert: PromscaleIngestHighLatency
expr: |
(
histogram_quantile(
0.90,
sum by (job, instance, namespace, type, le) (
rate(promscale_ingest_duration_seconds_bucket[5m])
)
) > 30
and
sum by (job, instance, namespace, type) (
rate(promscale_ingest_duration_seconds_bucket[5m])
)
) > 0
for: 5m
labels:
severity: critical
annotations:
summary: Slow Promscale ingestion.
description: "Slowest 10% of ingestion batch took more than {{ $value | humanizeDuration }} seconds to ingest."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleIngestHighLatency.md
- alert: PromscaleIngestHighDataDuplication
expr: |
sum by (job, namespace) (rate(promscale_ingest_duplicates_total{kind="sample"}[15m])) > 0
for: 30m
labels:
severity: warning
annotations:
summary: Duplicate data being inserted.
description: "More than {{ $value | humanize }} samples/sec are rejected as duplicates by promscale."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleIngestHighDataDuplication.md
- name: promscale-query
rules:
- alert: PromscaleQueryHighErrorRate
expr: |
(
sum by (job, instance, namespace, type, handler) (
rate(promscale_query_requests_total{code=~"5..",handler!="/api/v1/query_range",err!="canceled"}[5m])
)
/
sum by (job, instance, namespace, type, handler) (
rate(promscale_query_requests_total{handler!="/api/v1/query_range",err!="canceled"}[5m])
)
) > 0.05
labels:
severity: warning
annotations:
summary: High error rate in querying Promscale.
description: "Evaluating queries via Promscale {{ $labels.handler }} endpoint has {{ $value | humanizePercentage }} error rate."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleQueryHighErrorRate.md
- alert: PromscaleQueryHighErrorRate
expr: |
(
sum by (job, instance, namespace, type, handler) (
rate(promscale_query_requests_total{code=~"5..",handler="/api/v1/query_range",err!="canceled"}[5m])
)
/
sum by (job, instance, namespace, type, handler) (
rate(promscale_query_requests_total{handler="/api/v1/query_range",err!="canceled"}[5m])
)
) > 0.1
labels:
severity: warning
annotations:
summary: High error rate in querying Promscale.
description: "Evaluating queries via Promscale {{ $labels.handler }} endpoint has {{ $value | humanizePercentage }} error rate."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleQueryHighErrorRate.md
- alert: PromscaleQueryHighErrorRate
expr: |
(
sum by (job, instance, namespace, type) (
rate(promscale_query_requests_total{code=~"5..",err!="canceled"}[5m])
)
/
sum by (job, instance, namespace, type) (
rate(promscale_query_requests_total[5m])
)
) > 0.1
labels:
severity: critical
annotations:
summary: High error rate in querying Promscale.
description: "Evaluating queries via Promscale had {{ $value | humanizePercentage }} error rate."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleQueryHighErrorRate.md
- alert: PromscaleQueryHighLatency
expr: |
(
histogram_quantile(
0.90,
sum by (job, instance, namespace, type, le) (
rate(promscale_query_duration_seconds_bucket[5m])
)
) > 5
and
sum by (job, instance, namespace, type) (
rate(promscale_query_duration_seconds_bucket[5m])
) > 0
)
for: 5m
labels:
severity: warning
annotations:
summary: Slow Promscale querying.
description: "Slowest 10% of the queries took more than {{ $value | humanizeDuration }} seconds to evaluate."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleQueryHighLatency.md
- alert: PromscaleQueryHighLatency
expr: |
(
histogram_quantile(
0.90,
sum by (job, instance, namespace, type, le) (
rate(promscale_query_duration_seconds_bucket[5m])
)
) > 10
and
sum by (job, instance, namespace, type) (
rate(promscale_query_duration_seconds_bucket[5m])
) > 0
)
for: 5m
labels:
severity: critical
annotations:
summary: Slow Promscale querying.
description: "Slowest 10% of the queries took {{ $value | humanizeDuration }} seconds to evaluate."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleQueryHighLatency.md
- name: promscale-cache
rules:
- alert: PromscaleCacheHighNumberOfEvictions
expr: |
(
rate(promscale_cache_evictions_total[5m])
/
promscale_cache_capacity_elements
) > 0.2
labels:
severity: warning
annotations:
summary: High cache eviction in Promscale.
description: "Promscale {{ $labels.name }} is evicting at {{ $value }} entries a second."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleCacheHighNumberOfEvictions.md
- name: promscale-database-connection
rules:
- alert: PromscaleStorageHighErrorRate
expr: |
(
sum by (job, instance, namespace, method) (
rate(promscale_database_request_errors_total[5m])
)
/
sum by (job, instance, namespace, method) (
rate(promscale_database_requests_total[5m])
)
) > 0.05
labels:
severity: warning
annotations:
summary: Promscale experiences a high error rate when connecting to the database.
description: "Promscale connection with the database has an error rate of {{ $value | humanizePercentage }}."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleDBHighErrorRate.md
- alert: PromscaleStorageHighLatency
expr: |
(
histogram_quantile(0.9,
sum by (job, instance, namespace, method, le) (
rate(promscale_database_requests_duration_seconds_bucket{method!="exec"}[5m])
)
) > 5
and
sum by (job, instance, namespace, method) (
rate(promscale_database_requests_duration_seconds_count{method!="exec"}[5m])
) > 0
)
labels:
severity: warning
annotations:
summary: Slow database response.
description: "Slowest 10% of database requests with method {{ $labels.method }} are taking more than {{ $value | humanizeDuration }} seconds to respond."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleStorageHighLatency.md
- name: promscale-database
rules:
- alert: PromscaleStorageUnhealthy
expr: |
(
sum by (job, instance, namespace) (
rate(promscale_sql_database_health_check_errors_total[5m])
)
/
sum by (job, instance, namespace) (
rate(promscale_sql_database_health_check_total[5m])
)
) > 0.05
labels:
severity: warning
annotations:
summary: Promscale database is unhealthy.
description: "Promscale connection with the database has an error of {{ $value | humanizePercentage }}."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleStorageUnhealthy.md
- alert: PromscaleMaintenanceJobRunningTooLong
expr: |
(
(
(
time()
-
promscale_sql_database_worker_maintenance_job_start_timestamp_seconds
)
>
30 * 60 * 2 # 30 mins (we launch maintenance jobs scheduled at 30 mins) * 60 (to seconds) * 2 (wait max for 2 complete scans before firing alert).
)
and
promscale_sql_database_worker_maintenance_job_start_timestamp_seconds > 0
)
labels:
severity: warning
annotations:
summary: Promscale maintenance jobs taking too long to complete.
description: "Promscale Database is taking {{ $value | humanizeDuration }} seconds to respond to Promscale's requests."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleMaintenanceJobRunningTooLong.md
- alert: PromscaleMaintenanceJobNotKeepingup
expr: |
(
(
min_over_time(promscale_sql_database_chunks_metrics_uncompressed_count[1h]) > promscale_sql_database_metric_count
)
and
(
delta(promscale_sql_database_chunks_metrics_uncompressed_count[10m]) > 0
)
)
or
(
(
min_over_time(promscale_sql_database_chunks_metrics_expired_count[1h]) > promscale_sql_database_metric_count
)
and
(
delta(promscale_sql_database_chunks_metrics_expired_count[10m]) > 0
)
)
or
(
(
min_over_time(promscale_sql_database_chunks_traces_uncompressed_count[1h]) > promscale_sql_database_metric_count
)
and
(
delta(promscale_sql_database_chunks_traces_uncompressed_count[10m]) > 0
)
)
or
(
(
min_over_time(promscale_sql_database_chunks_traces_expired_count[1h]) > promscale_sql_database_metric_count
)
and
(
delta(promscale_sql_database_chunks_traces_expired_count[10m]) > 0
)
)
labels:
severity: warning
annotations:
summary: Promscale maintenance jobs are not keeping up.
description: "The amount of work for the promscale maintenance {{ $labels.name }} job is not decreasing for long time."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleMaintenanceJobRunningTooLong.md
- alert: PromscaleMaintenanceJobFailures
expr: promscale_sql_database_worker_maintenance_job_failed == 1
labels:
severity: warning
annotations:
summary: Promscale maintenance job failed.
description: "Maintenance job for Promscale instance {{ $labels.instance }} failed to successfully execute."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleMaintenanceJobFailures.md
- alert: PromscaleCompressionLow
expr: |
(
(
(promscale_sql_database_chunks_count - promscale_sql_database_chunks_compressed_count) # Number of uncompressed chunks.
/
promscale_sql_database_metric_count
) > 4 # If total number of average uncompressed chunk per metric is more than 4 chunks at maximum, we should alert.
and
promscale_sql_database_compression_status == 1
)
labels:
severity: warning
annotations:
summary: High uncompressed data.
description: "High uncompressed data in Promscale, on average, {{ $value }} uncompressed chunks per metric."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscaleCompressionLow.md
- alert: PromscalePostgreSQLSharedBuffersLow
expr: |
(
((promscale_sql_database_open_chunks_total_table_size + promscale_sql_database_open_chunks_total_index_size)
/
promscale_sql_database_shared_buffers_size)
> 1 )
for: 10m
labels:
severity: warning
annotations:
summary: Promscale database performance will be affected.
description: "Currently open chunks are {{ $value | humanizePercentage }} of PostgreSQL shared_buffers. This will impact database performance."
runbook_url: https://github.com/timescale/promscale/blob/master/docs/runbooks/PromscalePostgreSQLSharedBuffersLow.md