Skip to content

Commit

Permalink
Merge pull request #3567 from MalloZup/renable-alert
Browse files Browse the repository at this point in the history
mixin: Reintroduce thanos_objstore_bucket_operation_failures_total alert
  • Loading branch information
Ben Ye authored Dec 17, 2020
2 parents 2840c08 + d00e8d2 commit 5c12d46
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
11 changes: 11 additions & 0 deletions examples/alerts/alerts.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,17 @@ rules:
for: 5m
labels:
severity: critical
- alert: ThanosSidecarBucketOperationsFailed
annotations:
description: Thanos Sidecar {{$labels.job}} {{$labels.pod}} bucket operations
are failing
runbook_url: https://github.com/thanos-io/thanos/tree/master/mixin/runbook.md#alert-name-thanossidecarbucketoperationsfailed
summary: Thanos Sidecar bucket operations are failing
expr: |
rate(thanos_objstore_bucket_operation_failures_total{job=~"thanos-sidecar.*"}[5m]) > 0
for: 5m
labels:
severity: critical
- alert: ThanosSidecarUnhealthy
annotations:
description: Thanos Sidecar {{$labels.job}} {{$labels.pod}} is unhealthy for {{
Expand Down
11 changes: 11 additions & 0 deletions examples/alerts/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,17 @@ groups:
for: 5m
labels:
severity: critical
- alert: ThanosSidecarBucketOperationsFailed
annotations:
description: Thanos Sidecar {{$labels.job}} {{$labels.pod}} bucket operations
are failing
runbook_url: https://github.com/thanos-io/thanos/tree/master/mixin/runbook.md#alert-name-thanossidecarbucketoperationsfailed
summary: Thanos Sidecar bucket operations are failing
expr: |
rate(thanos_objstore_bucket_operation_failures_total{job=~"thanos-sidecar.*"}[5m]) > 0
for: 5m
labels:
severity: critical
- alert: ThanosSidecarUnhealthy
annotations:
description: Thanos Sidecar {{$labels.job}} {{$labels.pod}} is unhealthy for
Expand Down
14 changes: 14 additions & 0 deletions mixin/alerts/sidecar.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@
severity: 'critical',
},
},
{
alert: 'ThanosSidecarBucketOperationsFailed',
annotations: {
description: 'Thanos Sidecar {{$labels.job}} {{$labels.pod}} bucket operations are failing',
summary: 'Thanos Sidecar bucket operations are failing',
},
expr: |||
rate(thanos_objstore_bucket_operation_failures_total{%(selector)s}[5m]) > 0
||| % thanos.sidecar,
'for': '5m',
labels: {
severity: 'critical',
},
},
{
alert: 'ThanosSidecarUnhealthy',
annotations: {
Expand Down
2 changes: 1 addition & 1 deletion pkg/rules/rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func testRulesAgainstExamples(t *testing.T, dir string, server rulespb.RulesServ
{
Name: "thanos-sidecar",
File: filepath.Join(dir, "alerts.yaml"),
Rules: []*rulespb.Rule{someAlert, someAlert},
Rules: []*rulespb.Rule{someAlert, someAlert, someAlert},
Interval: 60,
PartialResponseStrategy: storepb.PartialResponseStrategy_ABORT,
},
Expand Down

0 comments on commit 5c12d46

Please sign in to comment.