Zabbix template for monitoring rdiff-backup repositories. This version is implemented in Bash only, no need to install myriad of Perl or Python scripts. Unfortunately, there are some restrictions in this blue heaven. Read the notes below.
- Copy
zabbix_agentd.d/rdiff-backup.confto the Zabbix agent's configuration directory (usually located in/etc). - Import template configuration
templates/rdiff-backup.xmlto Zabbix web frontend.
Because this plugin access rdiff-backup metadata directory directly, it fails doing that by default since rdiff-backup creates metadata files with least access bits (0700 / 0400) restricted to reading by owner only. In order for this plugin to succeed, either configure agent's commands in rdiff-backup.conf to be run as root (eg. via sudo) or:
- Make all
rdiff-backup-datametadata directories in all client backup locations group readable. This is one-timechmodonly, it must be done for every backup location once, permissions will not be touched later on. - Add user
zabbixto the groups of each backup client SSH account so thatzabbixuser is allowed to read contents of the directories mentioned in the first step. - Since
rdiff-backupcreates new statistics files on each run (and with owner-only access) something like this must be run periodically (e.g. viacrontab; adapt the first argument offindto your actual backup location):
0 * * * * root find /home -maxdepth 4 -name session_statistics.*.data -exec chmod g+r {} \;