From 1f28eb000d01bc2a83c5ab5566f7f9358bda81e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Fri, 8 Oct 2021 20:03:44 +0200 Subject: [PATCH] feat(monitoring): add uptime alert --- configs/monitoring/pull.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configs/monitoring/pull.nix b/configs/monitoring/pull.nix index 6654f24..1642037 100644 --- a/configs/monitoring/pull.nix +++ b/configs/monitoring/pull.nix @@ -60,6 +60,11 @@ in for = "1h"; annotations.summary = "{{$labels.job}}: Using lots of RAM."; } + { + alert = "UptimeMonster"; + expr = "time() - node_boot_time_seconds > 2592000"; + annotations.summary = "{{$labels.job}}: up for more than 30 days."; + } { alert = "HostDown"; expr = ''up == 0'';