Check BackupPC
The plugin can be downloaded from the developers website.
The plugin relies on a known installation of BackupPC. Check that the following directories does exist;
-
/usr/share/backuppc -
/usr/lib/nagios/plugins
If not, create symbolic links to resolve these directories;
sudo mkdir -p /usr/share/backuppc
sudo ln -s /opt/Backuppc/lib /usr/share/backuppc/lib
Also, the plugin relies on the location of the Nagios Monitoring Plugins 32 bit version, which might not existin in a 64bit installation. If this is the case link to the 64bit Nagios directory as follows;
sudo mkdir /usr/lib/nagios
sudo ln -s /usr/lib64/nagios/plugins /usr/lib/nagios/plugins
Command
Configure the command to run using sudo and the absolute path to the check command;
object CheckCommand "backuppc" {
import "plugin-check-command"
command = [
"/usr/bin/sudo",
"-u",
"backuppc",
"/var/share/repositories/icinga/check_backuppc"
]
}
Also create an entry in the sudoers file using the following command;
sudo visudo
and add the following line;
icinga ALL = (backuppc) NOPASSWD: /var/share/repositories/icinga/check_backuppc
where; * icinga refers to the Icinga2 process user * backuppc refers to the BackupPC process user
The NOPASSWD specifies that no password will be prompted when running the sudo command.