Skip to content

Commit

Permalink
fix and generate examples
Browse files Browse the repository at this point in the history
Signed-off-by: Thibault Mange <[email protected]>
  • Loading branch information
thibaultmg committed Jun 22, 2023
1 parent 93c50db commit d7793f0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
18 changes: 18 additions & 0 deletions examples/alerts/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,24 @@ groups:
for: 3h
labels:
severity: critical
- alert: ThanosReceiveLimitsConfigReloadFailure
annotations:
description: Thanos Receive {{$labels.job}} has not been able to reload the limits configuration.
runbook_url: https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanosreceivelimitsconfigreloadfailure
summary: Thanos Receive has not been able to reload the limits configuration.
expr: sum by(job) (increase(thanos_receive_limits_config_reload_err_total{job=~".*thanos-receive.*"}[5m])) > 0
for: 5m
labels:
severity: warning
- alert: ThanosReceiveLimitsHighMetaMonitoringQueriesFailureRate
annotations:
description: Thanos Receive {{$labels.job}} is failing for {{$value | humanize}}% of meta monitoring queries.
runbook_url: https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanosreceivelimitshighmetamonitoringqueriesfailurerate
summary: Thanos Receive has not been able to update the number of head series.
expr: sum by(job) (increase(thanos_receive_metamonitoring_failed_queries_total{job=~".*thanos-receive.*"}[5m])) / 20) * 100 > 20
for: 5m
labels:
severity: warning
- name: thanos-sidecar
rules:
- alert: ThanosSidecarBucketOperationsFailed
Expand Down
9 changes: 2 additions & 7 deletions mixin/alerts/receive.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,8 @@
description: 'Thanos Receive {{$labels.job}}%s is failing for {{$value | humanize}}%% of meta monitoring queries.' % location,
summary: 'Thanos Receive has not been able to update the number of head series.',
},
expr: |||
(
sum by(%(dimensions)s) (increase(thanos_receive_metamonitoring_failed_queries_total{%(selector)s}[5m]))
/
20
) * 100 > %(metaMonitoringErrorThreshold)s # Values are updated every 15s, 20 times over 5 minutes.'
||| % thanos.receive,
// Values are updated every 15s, 20 times over 5 minutes.
expr: '(sum by(%(dimensions)s) (increase(thanos_receive_metamonitoring_failed_queries_total{%(selector)s}[5m])) / 20) * 100 > %(metaMonitoringErrorThreshold)s' % thanos.receive,
'for': '5m',
labels: {
severity: 'warning',
Expand Down
2 changes: 2 additions & 0 deletions mixin/runbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
|ThanosReceiveHighHashringFileRefreshFailures|Thanos Receive is failing to refresh hasring file.|Thanos Receive {{$labels.job}} is failing to refresh hashring file, {{$value humanize}} of attempts failed.|warning|[https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanosreceivehighhashringfilerefreshfailures](https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanosreceivehighhashringfilerefreshfailures)|
|ThanosReceiveConfigReloadFailure|Thanos Receive has not been able to reload configuration.|Thanos Receive {{$labels.job}} has not been able to reload hashring configurations.|warning|[https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanosreceiveconfigreloadfailure](https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanosreceiveconfigreloadfailure)|
|ThanosReceiveNoUpload|Thanos Receive has not uploaded latest data to object storage.|Thanos Receive {{$labels.instance}} has not uploaded latest data to object storage.|critical|[https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanosreceivenoupload](https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanosreceivenoupload)|
|ThanosReceiveLimitsConfigReloadFailure|Thanos Receive has not been able to reload the limits configuration.|Thanos Receive {{$labels.job}} has not been able to reload the limits configuration.|warning|[https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanosreceivelimitsconfigreloadfailure](https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanosreceivelimitsconfigreloadfailure)|
|ThanosReceiveLimitsHighMetaMonitoringQueriesFailureRate|Thanos Receive has not been able to update the number of head series.|Thanos Receive {{$labels.job}} is failing for {{$value humanize}}% of meta monitoring queries.|warning|[https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanosreceivelimitshighmetamonitoringqueriesfailurerate](https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanosreceivelimitshighmetamonitoringqueriesfailurerate)|

## thanos-rule

Expand Down

0 comments on commit d7793f0

Please sign in to comment.