From e9414209f59febab7b2537ebf86a86823c60926b Mon Sep 17 00:00:00 2001 From: clerie Date: Sun, 2 Oct 2022 11:59:37 +0200 Subject: [PATCH] hosts/monitoring-3: alert for hosts that just booted --- hosts/monitoring-3/rules.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hosts/monitoring-3/rules.yml b/hosts/monitoring-3/rules.yml index 05c0a4b..864ac18 100644 --- a/hosts/monitoring-3/rules.yml +++ b/hosts/monitoring-3/rules.yml @@ -24,3 +24,10 @@ groups: annotations: summary: "Storage for backup is nearly full" description: "Storage for backups is nearly full" + - alert: InstanceJustBooted + expr: time() - node_boot_time_seconds{job="node-exporter"} <= 300 + labels: + severity: warning + annotations: + summary: "Uptime of {{ $labels.instance }} less than 5 min" + description: "{{ $labels.instance }} just booted"