aboutsummaryrefslogtreecommitdiff
path: root/modules/private/monitoring/objects_backup-2.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-02 01:33:08 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-02 01:33:08 +0100
commiteb071dd42518cb40d629e5bde29c6aed72e4d4df (patch)
treef9a109801d540ef8fc4c1b0656436f560ad1f6b7 /modules/private/monitoring/objects_backup-2.nix
parent9f2025235d888eb4a7822024a5fad2e288388814 (diff)
downloadNix-eb071dd42518cb40d629e5bde29c6aed72e4d4df.tar.gz
Nix-eb071dd42518cb40d629e5bde29c6aed72e4d4df.tar.zst
Nix-eb071dd42518cb40d629e5bde29c6aed72e4d4df.zip
Use nix expressions to build monitoring list
Diffstat (limited to 'modules/private/monitoring/objects_backup-2.nix')
-rw-r--r--modules/private/monitoring/objects_backup-2.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/modules/private/monitoring/objects_backup-2.nix b/modules/private/monitoring/objects_backup-2.nix
new file mode 100644
index 0000000..b8ecb81
--- /dev/null
+++ b/modules/private/monitoring/objects_backup-2.nix
@@ -0,0 +1,30 @@
1{ ... }:
2{
3 service = [
4 {
5 service_description = "Size on /backup2 partition";
6 use = "local-service";
7 check_command = ["check_local_disk" "10%" "5%" "/backup2"];
8 }
9 {
10 service_description = "Last backup in /backup2/phare is not too old";
11 use = "local-service";
12 check_command = ["check_last_file_date" "/backup2/phare" "14" "backup"];
13 }
14 {
15 service_description = "Last backup in /backup2/immae_eu is not too old";
16 use = "local-service";
17 check_command = ["check_last_file_date" "/backup2/immae_eu" "14" "backup"];
18 }
19 {
20 service_description = "Last backup in /backup2/immae_fr is not too old";
21 use = "local-service";
22 check_command = ["check_last_file_date" "/backup2/immae_fr" "14" "backup"];
23 }
24 {
25 service_description = "Last postgresql dump in /backup2/eldiron/postgresql_backup is not too old";
26 use = "local-service";
27 check_command = ["check_last_file_date" "/backup2/eldiron/postgresql_backup" "7" "postgres"];
28 }
29 ];
30}