./nagios_rdiffbackup_check -w 6h -c 12h -d /path/to/destinationA simple Nagios plugin to check how recent the current mirror increment of an http://www.rdiff-backup.org/|rdiff-backup destination is.
The -w / --warning and -c / --critical options set the warning and critical threshold values for the maximum time since last mirror increment.
They can be given in seconds, or with logical suffixes - m for minutes, h for hours, d for days.
The -d / --dest option specifies the directory to which rdiff-backup has been backing up.
The optional --rdiff-backup option sets the path to the rdiff-backup script; by default, just rdiff-backup will be used, which will work assuming that rdiff-backup is found in $PATH.
If the ownership on the backups is such that the user Nagios runs as wouldn't normally be able to read them, you can use the --sudo option to have rdiff-backup run using sudo - of course, you'll have to arrange for the Nagios user to do that - something like this in your sudoers file:
nagios ALL= NOPASSWD: /usr/bin/rdiff-backupDavid Precious <[email protected]>