]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/monitoring/objects_caldance-1.nix
Add monitoring host
[perso/Immae/Config/Nix.git] / modules / private / monitoring / objects_caldance-1.nix
diff --git a/modules/private/monitoring/objects_caldance-1.nix b/modules/private/monitoring/objects_caldance-1.nix
new file mode 100644 (file)
index 0000000..2879124
--- /dev/null
@@ -0,0 +1,57 @@
+{ ... }:
+let
+  defaultPassiveInfo = {
+    use = "external-passive-service";
+    freshness_threshold = "450";
+    retry_interval = "1";
+    host_name = "caldance-1.v.immae.eu";
+  };
+in
+{
+  host = {
+    "caldance-1.v.immae.eu" = {
+      alias = "caldance-1.v.immae.eu";
+      address = "caldance-1.v.immae.eu";
+      use = "linux-server";
+      hostgroups = "webstatus-hosts";
+      _webstatus_name = "caldance-1";
+    };
+  };
+  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 = "fail2ban is active";
+      servicegroups = "webstatus-resources";
+    }
+
+    {
+      service_description = "NTP is activated and working";
+      servicegroups = "webstatus-resources";
+      freshness_threshold = "5400";
+    }
+
+    {
+      service_description = "Databases are present in postgresql";
+      servicegroups = "webstatus-databases";
+    }
+  ];
+}