Table of Contents

Name

nagios-check-backup - shows hours since last backup

Synopsis

nagios-check-backup [...]

Description

This program prints the hours since the last backup. It gets the last backup timestamp in format YYYYMMDD from the file /var/log/backup.timestamp. As backup start time 22:10 is used for calculating the hours.
If amanda backup gives 1970-01-01 as backup date it will be treated as an error because no full backup exists.
On any error it prints "9999".
Its primary purpose is the usage as nagios remote plugin with net-snmp. Just add to snmpd.conf a single line like this:
extend .1.3.6.1.4.1.2021.66 rbackup /usr/sbin/nagios-check-backup

Any additional arguments are silently ignored and can be used as a mark for i.e. searching a snmpwalk output with less.

Return Value

The return value is 1 on any errors. On success 0 is returned.

Author

Frank Bergmann, http://www.tuxad.com


Table of Contents