diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-12-05 00:51:45 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-12-05 00:51:45 +0100 |
commit | 9f6a78629aad1d22dc8b928860fd05eb40f07352 (patch) | |
tree | 25c918ccd80eeb3e04d5d0c3ed4815ff3de5dcae /modules/private/monitoring | |
parent | 304a7dac48405d63a5d20466d4afc7ba04d11164 (diff) | |
download | Nix-9f6a78629aad1d22dc8b928860fd05eb40f07352.tar.gz Nix-9f6a78629aad1d22dc8b928860fd05eb40f07352.tar.zst Nix-9f6a78629aad1d22dc8b928860fd05eb40f07352.zip |
Add mysql replication
Diffstat (limited to 'modules/private/monitoring')
-rw-r--r-- | modules/private/monitoring/default.nix | 7 | ||||
-rw-r--r-- | modules/private/monitoring/objects_backup-2.nix | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/modules/private/monitoring/default.nix b/modules/private/monitoring/default.nix index 0259cbf..baeebc9 100644 --- a/modules/private/monitoring/default.nix +++ b/modules/private/monitoring/default.nix | |||
@@ -77,6 +77,13 @@ in | |||
77 | { command = "${myplugins}/check_last_file_date /backup2/*"; options = [ "NOPASSWD" ]; } | 77 | { command = "${myplugins}/check_last_file_date /backup2/*"; options = [ "NOPASSWD" ]; } |
78 | ]; | 78 | ]; |
79 | users = [ "naemon" ]; | 79 | users = [ "naemon" ]; |
80 | runAs = "mysql"; | ||
81 | } | ||
82 | { | ||
83 | commands = [ | ||
84 | { command = "${myplugins}/check_last_file_date /backup2/*"; options = [ "NOPASSWD" ]; } | ||
85 | ]; | ||
86 | users = [ "naemon" ]; | ||
80 | runAs = "backup"; | 87 | runAs = "backup"; |
81 | } | 88 | } |
82 | ]; | 89 | ]; |
diff --git a/modules/private/monitoring/objects_backup-2.nix b/modules/private/monitoring/objects_backup-2.nix index b8ecb81..fad6763 100644 --- a/modules/private/monitoring/objects_backup-2.nix +++ b/modules/private/monitoring/objects_backup-2.nix | |||
@@ -26,5 +26,10 @@ | |||
26 | use = "local-service"; | 26 | use = "local-service"; |
27 | check_command = ["check_last_file_date" "/backup2/eldiron/postgresql_backup" "7" "postgres"]; | 27 | check_command = ["check_last_file_date" "/backup2/eldiron/postgresql_backup" "7" "postgres"]; |
28 | } | 28 | } |
29 | { | ||
30 | service_description = "Last mysql dump in /backup2/eldiron/mysql_backup is not too old"; | ||
31 | use = "local-service"; | ||
32 | check_command = ["check_last_file_date" "/backup2/eldiron/mysql_backup" "7" "mysql"]; | ||
33 | } | ||
29 | ]; | 34 | ]; |
30 | } | 35 | } |