From d8bc769648c1528f5d749deee060d70e326ef431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 11 Jul 2018 09:11:42 +0200 Subject: Monitor rsync backups --- modules/profile/manifests/postgresql/backup_dump.pp | 2 +- modules/role/manifests/backup.pp | 6 ++++++ readme.md | 3 +-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/profile/manifests/postgresql/backup_dump.pp b/modules/profile/manifests/postgresql/backup_dump.pp index 5f456ed..e247cf0 100644 --- a/modules/profile/manifests/postgresql/backup_dump.pp +++ b/modules/profile/manifests/postgresql/backup_dump.pp @@ -63,7 +63,7 @@ define profile::postgresql::backup_dump ( "naemon-postgresql-dumps-$pg_host" => "naemon ALL=($pg_user) NOPASSWD: /usr/bin/find $pg_backup_path -mindepth 1 -maxdepth 1 -printf %T@?n", }, local => { - check_command => "check_last_file_date!$pg_backup_path!10!$pg_user", + check_command => "check_last_file_date!$pg_backup_path!7!$pg_user", } } } diff --git a/modules/role/manifests/backup.pp b/modules/role/manifests/backup.pp index c0672c6..6b8d00c 100644 --- a/modules/role/manifests/backup.pp +++ b/modules/role/manifests/backup.pp @@ -125,5 +125,11 @@ class role::backup ( order => "$order_dirname-$order_part", } } + + @profile::monitoring::local_service { "Last backup in $base is not too old": + local => { + check_command => "check_last_file_date!$base!14", + } + } } } diff --git a/readme.md b/readme.md index d8d8046..74bb294 100644 --- a/readme.md +++ b/readme.md @@ -22,10 +22,9 @@ reusable component. (The structure is inspired from the tutorial at - Add some monitoring: - modules/profile/manifests/postgresql/ssl.pp (check postgresql certificate) - modules/profile/manifests/postgresql/backup\_pgbouncer.pp (check pgbouncer works) - - modules/profile/manifests/apache.pp (check website is accessible and ssl) - modules/profile/manifests/mail.pp (check e-mails are going through) - modules/profile/manifests/redis.pp (check redis is running) - - modules/role/\* (role-specific checks) + - modules/role/manifests/cryptoportfolio (role-specific checks) - Add redis replication and dumps - Restore backups for cryptoportfolio - Ensure latest by default for packages -- cgit v1.2.3