]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/monitoring/objects_backup-2.nix
Use nix expressions to build monitoring list
[perso/Immae/Config/Nix.git] / modules / private / monitoring / objects_backup-2.nix
diff --git a/modules/private/monitoring/objects_backup-2.nix b/modules/private/monitoring/objects_backup-2.nix
new file mode 100644 (file)
index 0000000..b8ecb81
--- /dev/null
@@ -0,0 +1,30 @@
+{ ... }:
+{
+  service = [
+    {
+      service_description = "Size on /backup2 partition";
+      use = "local-service";
+      check_command = ["check_local_disk" "10%" "5%" "/backup2"];
+    }
+    {
+      service_description = "Last backup in /backup2/phare is not too old";
+      use = "local-service";
+      check_command = ["check_last_file_date" "/backup2/phare" "14" "backup"];
+    }
+    {
+      service_description = "Last backup in /backup2/immae_eu is not too old";
+      use = "local-service";
+      check_command = ["check_last_file_date" "/backup2/immae_eu" "14" "backup"];
+    }
+    {
+      service_description = "Last backup in /backup2/immae_fr is not too old";
+      use = "local-service";
+      check_command = ["check_last_file_date" "/backup2/immae_fr" "14" "backup"];
+    }
+    {
+      service_description = "Last postgresql dump in /backup2/eldiron/postgresql_backup is not too old";
+      use = "local-service";
+      check_command = ["check_last_file_date" "/backup2/eldiron/postgresql_backup" "7" "postgres"];
+    }
+  ];
+}