generated from onedr0p/cluster-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add prometheusrules for wohnzimmer
- Loading branch information
1 parent
0788fec
commit 71edc00
Showing
2 changed files
with
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ kind: Kustomization | |
resources: | ||
- ./miscellaneous.yaml | ||
- ./smartctl-exporter.yaml | ||
- ./wohnzimmer.yaml |
31 changes: 31 additions & 0 deletions
31
kubernetes/main/apps/monitoring/kube-prometheus-stack/app/prometheusrules/wohnzimmer.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,31 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kubernetes-schemas.18b.haus/monitoring.coreos.com/prometheusrule_v1.json | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PrometheusRule | ||
metadata: | ||
name: wohnzimmer | ||
spec: | ||
groups: | ||
- name: wohnzimmer.rules | ||
rules: | ||
- alert: WohnzimmerCalendarSyncOverdue | ||
annotations: | ||
summary: > | ||
No successful calendar sync within the last 24h. | ||
expr: > | ||
time() - | ||
wohnzimmer_calendar_latest_sync_seconds{status="success"} > 86400 | ||
for: 1m | ||
labels: | ||
severity: critical | ||
- alert: WohnzimmerCalendarSyncErrors | ||
annotations: | ||
summary: > | ||
{{ printf "%.1f" $value }}% of calendar syncs within the last 2h | ||
failed due to errors. | ||
expr: > | ||
sum(rate(wohnzimmer_calendar_syncs_total{status="error"}[2h])) / | ||
sum(rate(wohnzimmer_calendar_syncs_total[2h])) > 0.5 | ||
for: 15m | ||
labels: | ||
severity: warning |