I'm trying to monitor BackupPC with Icinga2.I've downloaded this plugin but I'm getting the following error.
I've added this to commands.conf
object CheckCommand "backuppc" {
import "plugin-check-command"
command = [ "sudo", "-u backuppc", PluginContribDir + "/check_backuppc" ]
arguments = {
"-w" = "$warn_lvl$"
"-c" = "$crit_lvl$"
"-v" = "$verbose$"
}
}
This was added to \etc\sudoers
Defaults:nagios !requiretty
nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/check_backuppc
And this was added to services.conf
apply Service "backuppc" {
import "generic-service"
check_command = "backuppc"
vars.warn_lvl = 14
vars.crit_lvl = 30
vars.verbose = ""
assign where host.name == NodeName
}
Backuppc user exists and the command is working, when I run it from shell:
root@backup:/# sudo -u backuppc ./usr/lib/nagios/plugins/check_backuppc
Use of qw(...) as parentheses is deprecated at /usr/share/backuppc/lib/BackupPC/Storage/Text.pm line 302.
Use of qw(...) as parentheses is deprecated at /usr/share/backuppc/lib/BackupPC/Lib.pm line 1425.
BACKUPPC CRITICAL ( 1 OK, 0 UNKNOWN, 0 WARNING, 1 CRITICAL)
Ty