From a46a338bf8b0786396202f05966c759a8310927c Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 15 Feb 2017 15:55:48 +0100 Subject: [PATCH] library/roles/nagios: Add a check for the postgresql wal files. --- nagios/defaults/main.yml | 2 ++ nagios/templates/postgresql-nrpe.cfg.j2 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/nagios/defaults/main.yml b/nagios/defaults/main.yml index 6b6591ac..4450cc3b 100644 --- a/nagios/defaults/main.yml +++ b/nagios/defaults/main.yml @@ -45,6 +45,8 @@ nagios_psql_query_time_w: 40 nagios_psql_query_time_c: 60 nagios_psql_db_size_w: 150000000 nagios_psql_db_size_c: 170000000 +nagios_psql_wal_files_w: 20 +nagios_psql_wal_files_c: 40 nrpe_command_timeout: 420 nrpe_include_dir: /etc/nagios/nrpe.d/ diff --git a/nagios/templates/postgresql-nrpe.cfg.j2 b/nagios/templates/postgresql-nrpe.cfg.j2 index d87b2c53..fd2e56af 100644 --- a/nagios/templates/postgresql-nrpe.cfg.j2 +++ b/nagios/templates/postgresql-nrpe.cfg.j2 @@ -5,6 +5,8 @@ command[{{ monitoring_group_name }}_check_postgresql_connection]=/usr/bin/sudo - command[{{ monitoring_group_name }}_check_postgresql_timesync]=/usr/bin/sudo -u postgres /usr/bin/check_postgres_timesync -db template1 +command[{{ monitoring_group_name }}_check_postgresql_wal_files]=/usr/bin/sudo -u postgres /usr/bin/check_postgres_wal_files -w {{ nagios_psql_wal_files_w }} -c {{ nagios_psql_wal_files_c }} + command[{{ monitoring_group_name }}_check_postgresql_backends]=/usr/bin/sudo -u postgres /usr/bin/check_postgres_backends -db template1 command[{{ monitoring_group_name }}_check_postgresql_commitratio]=/usr/bin/sudo -u postgres /usr/bin/check_postgres_commitratio -db template1