1 { lib, hostFQDN, emailCheck, ... }:
4 filter = lib.attrsets.filterAttrs
5 (k: v: builtins.elem k ["service_description"] || builtins.substring 0 1 k == "_");
6 use = "external-passive-service";
7 freshness_threshold = "450";
9 servicegroups = "webstatus-resources";
14 activatedPlugins = [ "emails" "postgresql" "zfs" ];
17 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-databases"; };
18 service_description = "Postgresql replication for backup-2 is up to date";
19 use = "local-service";
20 check_command = ["check_postgresql_replication" "backup-2" "/run/postgresql" "5432"];
23 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-resources"; };
24 service_description = "No ZFS pool is degraded";
25 use = "local-service";
26 check_command = ["check_zfs"];
29 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-email"; };
30 service_description = "mailq is empty";
31 use = "local-service";
32 check_command = ["check_mailq"];
34 (emailCheck "eldiron" hostFQDN // {
35 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-email"; freshness_threshold = "1350"; };