/check_backup_age

Icinga/Nagios check for backup age

Primary LanguagePythonMIT LicenseMIT

Check Backup Age for Nagios/Icinga

If you're using rsnapshot, this script will check when the last snapshot was taken. Using nothing but plain Python3.

Usage

This script takes as input a file containing list of dates, as you would get from ls --full-time. It extracts the dates and compares them to today's date.

The format of the dates and the regex to extract the dates can be adjusted.

Examples

Example for OK

./check_backup_age.py -p examples/offline-backup-list.ok
OK - Last backup was 0 days ago

Example for Critical

./check_backup_age.py -p examples/offline-backup-list.crit
CRIT - Last backup was 7 days ago