1 { config, pkgs, lib, name, monitoring, ... }:
3 hostFQDN = config.hostEnv.fqdn;
4 emailCheck = monitoring.lib.emailCheck config.myEnv.monitoring.email_check;
7 config.myServices.monitoring.smartdDisks = [
8 "ata-ST33000650NS_Z29540DM"
9 "ata-ST33000650NS_Z296JGJ4"
10 "ata-Micron_5200_MTFDDAK480TDC_18011BEE03B3"
13 config.myServices.monitoring.activatedPlugins = [ "memory" "command" "bandwidth" "emails" "mdadm" "postfix" "postgresql" "zfs" "notify-secondary" "smartctl" ];
14 config.myServices.monitoring.pluginsArgs.postgresql.package = config.myServices.databases.postgresql.package;
15 config.myServices.monitoring.objects = lib.mkMerge [
16 (monitoring.lib.objectsCommon {
20 processWarn = "550"; processAlert = "650";
21 loadWarn = "1.0"; loadAlert = "1.2";
22 interface = builtins.head (builtins.attrNames config.networking.interfaces);
28 service_description = "No mdadm array is degraded";
29 use = "local-service";
30 check_command = ["check_mdadm"];
31 __passive_servicegroups = "webstatus-resources";
34 service_description = "Postgresql replication for backup-2 is up to date";
35 use = "local-service";
36 check_command = ["check_postgresql_replication" "backup-2" "/run/postgresql" "5432"];
37 __passive_servicegroups = "webstatus-databases";
40 service_description = "No ZFS pool is degraded";
41 use = "local-service";
42 check_command = ["check_zfs"];
43 __passive_servicegroups = "webstatus-resources";
46 service_description = "mailq is empty";
47 use = "local-service";
48 check_command = ["check_mailq"];
49 __passive_servicegroups = "webstatus-email";
51 (emailCheck "eldiron" hostFQDN // {
52 __passive_servicegroups = "webstatus-email";