nagios-plugin-check_borg
nagios-plugin-check_borg copied to clipboard
nagios plugin to monitor borg repositories
check_borg
Check borg repository for date of latest archive.
Usable with nagios, icinga2 or any other nagios-fork.
Usage
./check_borg [ -C CONF ] [ -R <borg-repo-url> ] [ -P <borg-archivename-prefix> ] [ -c <date> ] [ -w <date> ]
<date> can be any valid format parsable by the date-command. So last day or 12 hours ago would be valid dates.
-R can be omitted, when BORG_REPO is set in the environment.
CONF is a file, which will get sourced. It can export variables like BORG_PASSPHRASE and BORG_REPO. You can separate with this file your borg specific secrets from the icinga2 configuration.
Non-standard executable paths
- If your
borgexecutable is not installed in your$PATHor is not calledborg, you can define the environment variableBORGto point to the correct command. - If the GNU
dateexecutable is not installed asdate, you can set the environment variableDATEto point to the correctdatecommand.
Passwords
Export BORG_PASSPHRASE.
Requirements
- GNU's version of
date. - borgbackup
Warnings
- Be sure about the implications, when monitoring a repository secured with a passphrase.
- I don't know how to exclude checkpoints in
borg listin combination with--format='{time}{NUL}'.