aboutsummaryrefslogtreecommitdiff
path: root/modules/private/monitoring/objects_eldiron.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-01-05 17:08:32 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-01-05 17:08:32 +0100
commite820134d38c3b7470ea5112f40a6dc967f039878 (patch)
treef05a5cefe285d060aa0ebf52829bcfcd35549f8b /modules/private/monitoring/objects_eldiron.nix
parentb22ce4895ef1e9723a02061f7293e528cfbf9754 (diff)
downloadNix-e820134d38c3b7470ea5112f40a6dc967f039878.tar.gz
Nix-e820134d38c3b7470ea5112f40a6dc967f039878.tar.zst
Nix-e820134d38c3b7470ea5112f40a6dc967f039878.zip
Add monitoring host
Diffstat (limited to 'modules/private/monitoring/objects_eldiron.nix')
-rw-r--r--modules/private/monitoring/objects_eldiron.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/modules/private/monitoring/objects_eldiron.nix b/modules/private/monitoring/objects_eldiron.nix
index 897fc15..bee4645 100644
--- a/modules/private/monitoring/objects_eldiron.nix
+++ b/modules/private/monitoring/objects_eldiron.nix
@@ -1,12 +1,25 @@
1{ ... }: 1{ lib, hostFQDN, ... }:
2let
3 defaultPassiveInfo = {
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";
8 retry_interval = "1";
9 servicegroups = "webstatus-resources";
10 host_name = hostFQDN;
11 };
12in
2{ 13{
3 service = [ 14 service = [
4 { 15 {
16 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-databases"; };
5 service_description = "Postgresql replication for backup-2 is up to date"; 17 service_description = "Postgresql replication for backup-2 is up to date";
6 use = "local-service"; 18 use = "local-service";
7 check_command = ["check_postgresql_replication" "backup-2" "/run/postgresql" "5432"]; 19 check_command = ["check_postgresql_replication" "backup-2" "/run/postgresql" "5432"];
8 } 20 }
9 { 21 {
22 passiveInfo = defaultPassiveInfo // { servicegroups = "webstatus-email"; };
10 service_description = "mailq is empty"; 23 service_description = "mailq is empty";
11 use = "local-service"; 24 use = "local-service";
12 check_command = ["check_mailq"]; 25 check_command = ["check_mailq"];