From b77e9016d7e6283ae6b38f365232dc0a5dc06c0c Mon Sep 17 00:00:00 2001 From: clerie Date: Wed, 24 May 2023 08:41:35 +0200 Subject: [PATCH] host/monitoring-3: add rule for backups that are behind --- hosts/monitoring-3/rules.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hosts/monitoring-3/rules.yml b/hosts/monitoring-3/rules.yml index 49ea8b5..06e74b8 100644 --- a/hosts/monitoring-3/rules.yml +++ b/hosts/monitoring-3/rules.yml @@ -25,6 +25,14 @@ groups: annotations: summary: "Storage of {{ $labels.instance }} is full" description: "Storage of {{ $labels.instance }} for {{ $labels.mountpoint }} on {{ $labels.device }} is full" + - alert: ClerieBackupJobLastSuccessfulRunBehind + expr: time() - clerie_backup_last_successful_run_time{} >= 5400 + for: 5m + labels: + severity: warning + annotations: + summary: "Last successful backup on {{ $labels.instance }} older than 1h" + description: "Backup job {{ $labels.backup_job }} to target {{ $labels.backup_instance }} finished successfully over an hour ago" - alert: InstanceJustBooted expr: time() - node_boot_time_seconds{job="node-exporter"} <= 300 labels: