This repository has been archived by the owner on May 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
k8s/manifests/system-monitoring/thanos/monitoring/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- prometheus-rules.yaml |
53 changes: 53 additions & 0 deletions
53
k8s/manifests/system-monitoring/thanos/monitoring/prometheus-rules.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PrometheusRule | ||
metadata: | ||
name: thanos-all | ||
namespace: monitoring | ||
spec: | ||
groups: | ||
- name: thanos-all | ||
rules: | ||
- alert: ThanosSidecarPrometheusDown | ||
annotations: | ||
description: Thanos Sidecar {{$labels.instance}} cannot connect to Prometheus. | ||
runbook_url: https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanossidecarprometheusdown | ||
summary: Thanos Sidecar cannot connect to Prometheus | ||
expr: | | ||
thanos_sidecar_prometheus_up{job=~".*thanos-sidecar.*"} == 0 | ||
for: 5m | ||
labels: | ||
severity: critical | ||
- alert: ThanosSidecarBucketOperationsFailed | ||
annotations: | ||
description: Thanos Sidecar {{$labels.instance}} bucket operations are failing | ||
runbook_url: https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanossidecarbucketoperationsfailed | ||
summary: Thanos Sidecar bucket operations are failing | ||
expr: | | ||
sum by (job, instance) (rate(thanos_objstore_bucket_operation_failures_total{job=~".*thanos-sidecar.*"}[5m])) > 0 | ||
for: 5m | ||
labels: | ||
severity: critical | ||
- alert: ThanosSidecarUnhealthy | ||
annotations: | ||
description: | ||
Thanos Sidecar {{$labels.instance}} is unhealthy for more than {{$value}} | ||
seconds. | ||
runbook_url: https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanossidecarunhealthy | ||
summary: Thanos Sidecar is unhealthy. | ||
expr: | | ||
time() - max by (job, instance) (thanos_sidecar_last_heartbeat_success_time_seconds{job=~".*thanos-sidecar.*"}) >= 240 | ||
for: 5m | ||
labels: | ||
severity: critical | ||
- alert: ThanosSidecarIsDown | ||
annotations: | ||
description: | ||
ThanosSidecar has disappeared. Prometheus target for the component | ||
cannot be discovered. | ||
runbook_url: https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanossidecarisdown | ||
summary: Thanos component has disappeared. | ||
expr: | | ||
thanos_sidecar_prometheus_up{job=~".*thanos-sidecar.*"} == 0 | ||
for: 5m | ||
labels: | ||
severity: critical |