1 { config, pkgs, lib, hostFQDN, ... }:
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";
16 passiveInfo = defaultPassiveInfo;
17 service_description = "Size on /backup2 partition";
18 use = "local-service";
19 check_command = ["check_local_disk" "10%" "5%" "/backup2"];
22 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-backup"; };
23 service_description = "Last backup in /backup2/phare is not too old";
24 use = "local-service";
25 check_command = ["check_last_file_date" "/backup2/phare" "14" "backup"];
28 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-backup"; };
29 service_description = "Last backup in /backup2/immae_eu is not too old";
30 use = "local-service";
31 check_command = ["check_last_file_date" "/backup2/immae_eu" "14" "backup"];
34 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-backup"; };
35 service_description = "Last backup in /backup2/ulminfo is not too old";
36 use = "local-service";
37 check_command = ["check_last_file_date" "/backup2/ulminfo" "14" "backup"];
40 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-databases,webstatus-backup"; };
41 service_description = "Last postgresql dump in /backup2/eldiron/postgresql_backup is not too old";
42 use = "local-service";
43 check_command = ["check_last_file_date" "/backup2/eldiron/postgresql_backup" "7" "postgres"];
46 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-databases"; };
47 service_description = "Redis replication for eldiron is up to date";
48 use = "local-service";
49 check_command = ["check_redis_replication" "/run/redis_eldiron/redis.sock"];
52 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-databases,webstatus-backup"; };
53 service_description = "Last redis dump in /backup2/eldiron/redis_backup is not too old";
54 use = "local-service";
55 check_command = ["check_last_file_date" "/backup2/eldiron/redis_backup" "7" "redis"];
58 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-databases"; };
59 service_description = "Mysql replication for eldiron is up to date";
60 use = "local-service";
61 check_command = ["check_mysql_replication" "/run/mysqld_eldiron/mysqld.sock" "/var/secrets/mysql_replication/eldiron/client"];
64 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-databases,webstatus-backup"; };
65 service_description = "Last mysql dump in /backup2/eldiron/mysql_backup is not too old";
66 use = "local-service";
67 check_command = ["check_last_file_date" "/backup2/eldiron/mysql_backup" "7" "mysql"];
70 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-databases"; };
71 service_description = "Openldap replication for eldiron is up to date";
72 use = "local-service";
75 hcfg = config.myServices.databasesReplication.openldap.hosts.eldiron;
76 base = config.myServices.databasesReplication.openldap.base;
77 eldiron_schemas = pkgs.callPackage ../databases/openldap/eldiron_schemas.nix {};
78 ldapConfig = pkgs.writeText "slapd.conf" ''
85 directory ${base}/${name}/openldap
88 "check_openldap_replication"
91 "${config.secrets.location}/openldap_replication/eldiron/replication_password"
97 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-databases,webstatus-backup"; };
98 service_description = "Last openldap dump in /backup2/eldiron/openldap_backup is not too old";
99 use = "local-service";
100 check_command = ["check_last_file_date" "/backup2/eldiron/openldap_backup" "7" "openldap"];