{ lib, pkgs, config, ... }: # Standard module arguments { services.vmalert.rules.groups = [ { name = "HostStatusAlerts"; rules = [ { alert = "HostDown"; expr = "up == 0"; for = "2m"; labels = { severity = "critical"; category = "availability"; }; annotations = { summary = "Host {{ $labels.instance }} is down"; description = "Host {{ $labels.instance }} (job: {{ $labels.job }}) has been down for more than 2 minutes."; }; } ]; } ]; }