I have installed Nagios Core and everything is well as per documentation of Nagios. I have SELINUX enabled and Nagios gives an error when I reschedule an event from UI.
I get the error as below:
Code: Select all
Error: Could not stat() command file '/usr/local/nagios/var/rw/nagios.cmd'!
The external command file may be missing, Nagios may not be running, and/or Nagios may not be checking external commands.
An error occurred while attempting to commit your command for processing.
Code: Select all
[root@puppet local]# ls -l /usr/local/nagios/var/rw/nagios.cmd
prw-rw----. 1 nagios nagcmd 0 Jul 9 19:43 /usr/local/nagios/var/rw/nagios.cmd
[root@puppet local]# ls -l /usr/local/nagios/var/rw/
total 0
prw-rw----. 1 nagios nagcmd 0 Jul 9 19:43 nagios.cmd
srw-rw----. 1 nagios nagcmd 0 Jul 9 19:43 nagios.qh
[root@puppet local]# ls -ld /usr/local/nagios/var/rw/
drwxrwsr-x. 2 nagios nagcmd 4096 Jul 9 19:43 /usr/local/nagios/var/rw/
[root@puppet local]# grep nag /etc/group
nagios:x:492:nagios
nagcmd:x:501:apache
[root@puppet local]#
Code: Select all
[root@puppet etc]# cat cgi.cfg |grep authorized
authorized_for_system_information=nagios
authorized_for_configuration_information=nagios
authorized_for_system_commands=nagios
authorized_for_all_services=nagios
authorized_for_all_hosts=nagios
authorized_for_all_service_commands=nagios
authorized_for_all_host_commands=nagios
#authorized_for_read_only=user1,user2
[root@puppet etc]#
My OS version is CentOS 6.8
Code: Select all
[root@puppet /]# getenforce
Enforcing
[root@puppet /]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
[root@puppet