Skip to content

Commit eba61a6

Browse files
committed
Reintroduce thanos_objstore_bucket_operation_failures_total alert
Metric was removed on PR 2002 by mistake Signed-off-by: dmaiocchi <dmaiocchi@suse.com>
1 parent 4abb51a commit eba61a6

File tree

5 files changed

+38
-1
lines changed

5 files changed

+38
-1
lines changed

examples/alerts/alerts.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,17 @@ rules:
314314
for: 5m
315315
labels:
316316
severity: critical
317+
- alert: ThanosSidecarBucketOperationsFailed
318+
annotations:
319+
description: Thanos Sidecar {{$labels.job}} {{$labels.pod}} bucket operations
320+
are failing
321+
runbook_url: https://github.com/thanos-io/thanos/tree/master/mixin/runbook.md#alert-name-thanossidecarbucketoperationsfailed
322+
summary: Thanos Sidecar cannot connect to Prometheus
323+
expr: |
324+
rate(thanos_objstore_bucket_operation_failures_total{name="prometheus"}[5m]) > 0
325+
for: 5m
326+
labels:
327+
severity: critical
317328
- alert: ThanosSidecarUnhealthy
318329
annotations:
319330
description: Thanos Sidecar {{$labels.job}} {{$labels.pod}} is unhealthy for {{

examples/alerts/alerts.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,17 @@ groups:
295295
for: 5m
296296
labels:
297297
severity: critical
298+
- alert: ThanosSidecarBucketOperationsFailed
299+
annotations:
300+
description: Thanos Sidecar {{$labels.job}} {{$labels.pod}} bucket operations
301+
are failing
302+
runbook_url: https://github.com/thanos-io/thanos/tree/master/mixin/runbook.md#alert-name-thanossidecarbucketoperationsfailed
303+
summary: Thanos Sidecar cannot connect to Prometheus
304+
expr: |
305+
rate(thanos_objstore_bucket_operation_failures_total{name="prometheus"}[5m]) > 0
306+
for: 5m
307+
labels:
308+
severity: critical
298309
- alert: ThanosSidecarUnhealthy
299310
annotations:
300311
description: Thanos Sidecar {{$labels.job}} {{$labels.pod}} is unhealthy for

foo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fdfd

mixin/alerts/sidecar.libsonnet

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@
2222
severity: 'critical',
2323
},
2424
},
25+
{
26+
alert: 'ThanosSidecarBucketOperationsFailed',
27+
annotations: {
28+
description: 'Thanos Sidecar {{$labels.job}} {{$labels.pod}} bucket operations are failing',
29+
summary: 'Thanos Sidecar cannot connect to Prometheus',
30+
},
31+
expr: |||
32+
rate(thanos_objstore_bucket_operation_failures_total{name="prometheus"}[5m]) > 0
33+
||| % thanos.sidecar,
34+
'for': '5m',
35+
labels: {
36+
severity: 'critical',
37+
},
38+
},
2539
{
2640
alert: 'ThanosSidecarUnhealthy',
2741
annotations: {

pkg/rules/rules_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func testRulesAgainstExamples(t *testing.T, dir string, server rulespb.RulesServ
8282
{
8383
Name: "thanos-sidecar",
8484
File: filepath.Join(dir, "alerts.yaml"),
85-
Rules: []*rulespb.Rule{someAlert, someAlert},
85+
Rules: []*rulespb.Rule{someAlert, someAlert, someAlert},
8686
Interval: 60,
8787
PartialResponseStrategy: storepb.PartialResponseStrategy_ABORT,
8888
},

0 commit comments

Comments
 (0)