]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/monitoring/objects_monitoring-1.nix
Remove duply-backup
[perso/Immae/Config/Nix.git] / modules / private / monitoring / objects_monitoring-1.nix
index 0e7d9dfd1205e491d3d17d09ac5e02be8a679564..563be167657b63d6ceadadb2f09baf8e21da6923 100644 (file)
@@ -1,26 +1,4 @@
 { 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 = {
@@ -718,7 +696,7 @@ in
       check_command = [ "check_https" "origny.tiboqorl.fr" "/" "<title>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";
@@ -733,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;
 }