Nagios 4.1.1: fixing the Nagios - "Could not open command file /usr/local/nagios/var/rw/nagios.cmd’ for update"
Nagios - Could not open command file /usr/local/nagios /var/rw /nagios . cmd ’ for update
Whenever we are trying to disable/enable active check for a
service through a Nagios web interface, but we can't make it.
The Nagios instance is running and configured on a Centos 6.7 distribution
Each time when we try to stop the service we get this message
Please follow these steps to fix this issue
We have to stop the nagios and apache services
# service httpd
stop
#
service nagios stop
We needed to add
the users nagios and apache to nagcmd group
#
usermod -a -G nagcmd nagios
# usermod -a -G nagcmd apache
# usermod -a -g
Change the
permission of the folder where the nagios . cmd are
there
# chown nagios : nagcmd /usr/local/nagios /var/rw
We needed to
change start the nagios services
# service nagios start
We needed to
change the permissions of the nagios user and nagcmd group
to the
# chown nagios : nagcmd /usr/local/nagios /var/rw /nagios . cmd
Restart the nagios services and start the
apache services
# service
httpd start
# service
Hope this will fix the isses
Please check this while running this
commands
We needed to check the SElinux if it is enforced change it to
permissive, to check the SElinux status
# sestatus
To change the SElinux temperorary
# getenforce
# setenforce 0
# service nagios restart
To change
# vi /etc/sysconfig/selinux
#
SELINUX=permissive
Nagios 4.1.1 other links
Installing Nagios Core 4.1.1 on Centos 6.7
Adding Nagios Linux host to Nagios core server
Adding Windows host to Nagios Core server
Adding MRTG to Nagios Core 4.1.1
Adding Nagios Graph to Nagios core 4.1.1
Keywords: Nagios, Monitoring, Linux host, Ading Linux host, Errors, Nagios Errors
Installing Nagios Core 4.1.1 on Centos 6.7
Adding Nagios Linux host to Nagios core server
Adding Windows host to Nagios Core server
Adding MRTG to Nagios Core 4.1.1
Adding Nagios Graph to Nagios core 4.1.1
Keywords: Nagios, Monitoring, Linux host, Ading Linux host, Errors, Nagios Errors
Comments
Post a Comment