Nagios/Icinga: Check existance of daily PostgreSQL backup file
authorMichael Peters <mpeters@emeralddata.net>
Wed, 5 Aug 2015 18:15:08 +0000 (14:15 -0400)
committerMichael Peters <mpeters@emeralddata.net>
Wed, 5 Aug 2015 18:21:01 +0000 (14:21 -0400)
commit3e38ded8c2fc88d2bb2cda1151b419799c4b0326
treece194071d54f50df45fbe56c0957109875f0fa14
parent8850a78149bcc3ac1d8eac44b821ce86036bf486
Nagios/Icinga:  Check existance of daily PostgreSQL backup file

A Nagios plugin (also works with NRPE and Icinga) written in Perl
which checks for the existance of a daily PostgreSQL backup file.

To use, install to your nagios-plugins folder (usually /usr/lib/nagios/plugins)
and make sure the script has executable permissions by the nagios user.

This script will return one of three statuses to Nagios/Icinga;

OK - File does not exist, because it has not yet been created by cron.
OK - File exists.
CRITICAL File does not exist.

Follow the comments in the script to configure the first hour, on
a new day, that you want to begin checking for existance of the file.

A function is included so that you won't recieve a critical alert
when the clock hits 00:00 and no backup file exists because your
backup cron job has not yet run.

Signed-off-by: Michael Peters <mpeters@emeralddata.net>