X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fmonitoring%2Fobjects_monitoring-1.nix;h=563be167657b63d6ceadadb2f09baf8e21da6923;hb=fa25ffd4583cc362075cd5e1b4130f33306103f0;hp=6432ddb1903f0e1881a2a4aed25436de7015f9e1;hpb=c41d0de83b1841097c6be8d8baeed557b065657b;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/monitoring/objects_monitoring-1.nix b/modules/private/monitoring/objects_monitoring-1.nix index 6432ddb..563be16 100644 --- a/modules/private/monitoring/objects_monitoring-1.nix +++ b/modules/private/monitoring/objects_monitoring-1.nix @@ -1,27 +1,6 @@ { config, pkgs, nodes, hostFQDN, emailCheck, lib, ... }: -let - to_resource = func: cfg: lib.flatten (lib.optionals cfg.enable (lib.mapAttrsToList func cfg.profiles)); - to_backup_age_dependency = name: profile: map (remote: - { - dependent_host_name = "eldiron.immae.eu"; - host_name = "eldiron.immae.eu"; - dependent_service_description = "${remote} backup for ${name} is not too old"; - service_description = "${remote} backup is up and not full"; - execution_failure_criteria = "u"; - notification_failure_criteria = "u"; - }) profile.remotes; - to_backup_age = name: profile: map (remote: - { - service_description = "${remote} backup for ${name} is not too old"; - host_name = "eldiron.immae.eu"; - use = "external-service"; - check_command = ["check_backup_${remote}_age" name]; - - check_interval = "120"; - notification_interval = "1440"; - }) profile.remotes; -in { + activatedPlugins = [ "dns" "ftp" "git" "http" "imap" "ovh" "tcp" ]; host = { # Dummy host for testing # "dummy-host" = { @@ -370,6 +349,17 @@ in _webstatus_url = "https://cloud.immae.eu"; } + { + service_description = "nextcloud website is running on nextcloud.4c.salle-s.org"; + host_name = "quatresaisons.immae.eu"; + use = "external-web-service"; + check_command = ["check_https" "nextcloud.4c.salle-s.org" "/" "a safe home for all your data"]; + + servicegroups = "webstatus-webapps"; + _webstatus_name = "Nextcloud"; + _webstatus_url = "https://nextcloud.4c.salle-s.org"; + } + { service_description = "davical website is running on dav.immae.eu"; host_name = "eldiron.immae.eu"; @@ -706,7 +696,7 @@ in check_command = [ "check_https" "origny.tiboqorl.fr" "/" "Home Assistant" ]; _webstatus_namespace = "tiboqorl"; } - ] ++ to_resource to_backup_age nodes.eldiron.config.services.duplyBackup; + ]; contact = { telio-tortay = config.myEnv.monitoring.contacts.telio-tortay // { use = "generic-contact"; @@ -721,5 +711,4 @@ in telio-tortay = { alias = "Telio Tortay"; members = "immae"; }; tiboqorl = { alias = "Tiboqorl"; members = "immae"; }; }; - servicedependency = to_resource to_backup_age_dependency nodes.eldiron.config.services.duplyBackup; }