X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fmonitoring%2Fobjects_monitoring-1.nix;h=f82af2171ef70dab752315e8536cdbf339f95949;hb=de5b6cf13efac442885f6b20caffeb67f9920115;hp=32dbe4b9cd758b340f3bd13903cd587a4fd606ab;hpb=acab8301f6a0a76d97b36d009a60d4172bf62981;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 32dbe4b..f82af21 100644 --- a/modules/private/monitoring/objects_monitoring-1.nix +++ b/modules/private/monitoring/objects_monitoring-1.nix @@ -1,32 +1,14 @@ { 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" = { # alias = "dummy.host"; + # check_interval = "0.3"; + # max_check_attempts = "1"; + # flap_detection_enabled = "0"; + # notification_interval = "0.1"; # address = "dummy.host"; # use = "linux-server"; # check_command = "check_ok"; @@ -371,6 +353,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"; @@ -691,23 +684,22 @@ in # Tiboqorl { - service_description = "Cyllene support page is running"; + service_description = "Origny page is running on ipv4"; host_name = "tiboqorl.fr"; use = "external-web-service"; contact_groups = "tiboqorl"; - check_command = [ "check_https" "sc.groupe-cyllene.com" "/" "Support Client Cyllene" ]; + check_command = [ "check_https_4" "origny.tiboqorl.fr" "/" "<title>Home Assistant" ]; _webstatus_namespace = "tiboqorl"; } - { - service_description = "Origny page is running"; + service_description = "Origny page is running on ipv6"; host_name = "tiboqorl.fr"; use = "external-web-service"; contact_groups = "tiboqorl"; - check_command = [ "check_https" "origny.tiboqorl.fr" "/" "<title>Home Assistant" ]; + check_command = [ "check_https_6" "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"; @@ -720,7 +712,6 @@ in }; contactgroup = { telio-tortay = { alias = "Telio Tortay"; members = "immae"; }; - tiboqorl = { alias = "Tiboqorl"; members = "immae"; }; + tiboqorl = { alias = "Tiboqorl"; members = ""; }; }; - servicedependency = to_resource to_backup_age_dependency nodes.eldiron.config.services.duplyBackup; }