From e820134d38c3b7470ea5112f40a6dc967f039878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 5 Jan 2020 17:08:32 +0100 Subject: Add monitoring host --- modules/private/monitoring/objects_immae-eu.nix | 123 ++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 modules/private/monitoring/objects_immae-eu.nix (limited to 'modules/private/monitoring/objects_immae-eu.nix') diff --git a/modules/private/monitoring/objects_immae-eu.nix b/modules/private/monitoring/objects_immae-eu.nix new file mode 100644 index 0000000..3dda999 --- /dev/null +++ b/modules/private/monitoring/objects_immae-eu.nix @@ -0,0 +1,123 @@ +{ ... }: +let + defaultPassiveInfo = { + use = "external-passive-service"; + freshness_threshold = "450"; + retry_interval = "1"; + host_name = "immae.eu"; + }; +in +{ + host = { + "immae.eu" = { + alias = "immae.eu"; + address = "immae.eu"; + use = "linux-server"; + hostgroups = "webstatus-hosts"; + _webstatus_name = "immaeEu"; + }; + }; + service = map (s: defaultPassiveInfo // s) [ + { + service_description = "size on root partition"; + servicegroups = "webstatus-resources"; + } + + { + service_description = "total number of process"; + servicegroups = "webstatus-resources"; + } + + { + service_description = "average load"; + servicegroups = "webstatus-resources"; + } + + { + service_description = "swap usage"; + servicegroups = "webstatus-resources"; + } + + { + service_description = "no mdadm array is degraded"; + servicegroups = "webstatus-resources"; + } + + { + service_description = "ntp is activated and working"; + servicegroups = "webstatus-resources"; + } + + { + service_description = "ssh connexion responds"; + } + + { + service_description = "fail2ban is active"; + servicegroups = "webstatus-resources"; + } + + { + service_description = "pacman packages are not too old"; + servicegroups = "webstatus-resources"; + freshness_threshold = "10800"; + notification_interval = "0"; + } + + { + service_description = "rsync backup happened not too long ago"; + servicegroups = "webstatus-backup"; + } + + { + service_description = "eriomem backup is up and not full"; + freshness_threshold = "10800"; + notification_interval = "120"; + servicegroups = "webstatus-backup"; + } + + { + service_description = "postfix service is active"; + } + + { + service_description = "tinc@Immae service is active"; + } + + { + service_description = "sshd service is active"; + } + + { + service_description = "httpd service is active"; + servicegroups = "webstatus-resources"; + } + + { + service_description = "postfix SSL is up to date"; + } + + { + service_description = "mailq is empty"; + servicegroups = "webstatus-email"; + } + + ## Sending e-mail + { + service_description = "immae.eu email service is active"; + servicegroups = "webstatus-email"; + freshness_threshold = "1350"; + } + + #### Web scenarios + { + service_description = "discourse website is running on discourse.capitaines.fr"; + freshness_threshold = "1800"; + } + + { + service_description = "Default website site is running on ns208507.ip-188-165-209.eu"; + freshness_threshold = "1800"; + } + ]; +} -- cgit v1.2.3