0

Software Versions:
icinga-1.13.0-0.el7.centos.x86_64
nagios-plugins-all-2.0.3-3.el7.x86_64
CentOS 7.3.1611

[1484095979] error executing command '/check_ping': No such file or directory. Make sure that the file actually exists (in PATH, if set) and is executable!
[1484095979] error executing command '/check_swap': No such file or directory. Make sure that the file actually exists (in PATH, if set) and is executable!
[1484095989] error executing command '/check_ssh': No such file or directory. Make sure that the file actually exists (in PATH, if set) and is executable!

yet resources.cfg contains the line, $USER1$=/usr/lib64/nagios/plugins
and the plugin files are all -rwxr-xr-x and owned root:root like on other working Icinga machines.

SELinux is disabled.

The /var/log/secure contains lines I don't understand.

Jan 10 15:25:55 bnx-aakadsnmp polkitd[660]: Registered Authentication Agent for unix-process:24805:242041525 (system bus name :1.9697 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) Jan 10 15:25:55 bnx-aakadsnmp polkitd[660]: Unregistered Authentication Agent for unix-process:24805:242041525 (system bus name :1.9697, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus) Jan 10 15:27:32 bnx-aakadsnmp polkitd[660]: Registered Authentication Agent for unix-process:24831:242051221 (system bus name :1.9698 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) Jan 10 15:27:32 bnx-aakadsnmp polkitd[660]: Unregistered Authentication Agent for unix-process:24831:242051221 (system bus name :1.9698, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)

EDIT: I can fix this permission issue by adding rules to /etc/sudoers allowing icinga to run these nagios binaries and editing my commands.cfg file to run sudo before the command, ex.

define command {
        command_name    check-host-icmp
        command_line    /usr/bin/sudo $USER1$/check_icmp -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}

but that leads me to wonder if there isn't a cleaner way. Or why do the Nagios plugins need to be owned by root:root?

mr.zog
  • 902
  • 3
  • 16
  • 36

0 Answers0