diff --git a/modules/nixos/monitoring/alert-rules.nix b/modules/nixos/monitoring/alert-rules.nix index 148dec3..2059c23 100644 --- a/modules/nixos/monitoring/alert-rules.nix +++ b/modules/nixos/monitoring/alert-rules.nix @@ -106,8 +106,13 @@ lib.mapAttrsToList description = "{{$labels.host}} is running with load15 > 1 for at least 5 minutes: {{$value}}"; }; + localhost_reboot = { + condition = ''system_uptime{instance="localhost:9273"} < 900''; + description = "{{$labels.host}} just rebooted"; + }; + reboot = { - condition = "system_uptime < 600"; + condition = ''system_uptime{instance!="localhost:9273"} < 300''; description = "{{$labels.host}} just rebooted"; };