Page 2 of 3
Re: Disabled Hosts Still Monitored
Posted: Wed Aug 08, 2012 1:33 pm
by jbennett
Code: Select all
-r-sr-xr-x 1 root root 80057 Jul 24 15:54 check_icmp
-rwxr-xr-x 1 root root 80892 Jul 24 15:54 check_ping
I am wondering if this has something to do with permissions though. When I try to schedule down time, or acknowledge a host or service, I get the following:
Code: Select all
Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!
When I check nagios.cmd permissions, I see the following:
Code: Select all
prw-rw---- 1 nagios nagiocmd 0 Aug 8 16:27 nagios.cmd
and on the /rw folder:
Code: Select all
drwxrwsr-x 2 nagios nagiocmd 4096 Aug 8 18:48 rw
I'm wondering if permissions system wide might be wrong?
When I run a permissions check, I see that the Config Scripts and Config Files permissions appear to be ok.
Is there a script that I can run that might reset permissions system wide or am I running into two different issues here?
Re: Disabled Hosts Still Monitored
Posted: Wed Aug 08, 2012 3:02 pm
by nscott
That nagiocmd group on the nagios.cmd is troubling, it should be nagcmd, can you try restarting the nagios service manually?
service nagios restart
Does that change the group to nagcmd?
Re: Disabled Hosts Still Monitored
Posted: Thu Aug 09, 2012 9:33 am
by jbennett
It does not.
I should note that I followed some directions after searching for a resolution to the issue. Apparently, that wasn't the best move.
When I go to check the groups on the system, I see a group for nagcmd (the comment I made previously, was from my looking on the wrong box).
I'm hoping even more that this is something we can resolve relatively easily.
would taking these steps resolve?
Code: Select all
usermod -G nagcmd nagios
usermod -G nagcmd apache
Re: Disabled Hosts Still Monitored
Posted: Thu Aug 09, 2012 11:04 am
by scottwilkerson
please attach your file locate at
Re: Disabled Hosts Still Monitored
Posted: Thu Aug 09, 2012 12:54 pm
by jbennett
Please find attached.
Re: Disabled Hosts Still Monitored
Posted: Thu Aug 09, 2012 1:23 pm
by scottwilkerson
I'm still trying to decipher how you have nagiocmd instead of nagcmd as the group.
Did you try to recompile nagios core outside of one of the XI install or upgrade scripts?
What version of XI are you running?
Re: Disabled Hosts Still Monitored
Posted: Thu Aug 09, 2012 3:27 pm
by jbennett
The directions I found online suggested to make the group nagiocmd and change permissions to that group. I have since reverted back now for the /rw folder and the nagios.cmd file.
Apparently, the error message i'm getting is pretty common and the solution is always listed as making sure you have the group as nagiocmd and the file permissions set appropriately.
I am on 2011R2.3 currently.
Re: Disabled Hosts Still Monitored
Posted: Thu Aug 09, 2012 4:31 pm
by scottwilkerson
Where are you finding these solution? I searched our whole forum for "nagiocmd" and only found this thread...
Re: Disabled Hosts Still Monitored
Posted: Fri Aug 10, 2012 8:36 am
by jbennett
Not here, in various other online blogs/threads/posts/email lists/etc.
I changed the group of that file and folder and I still don't have the ability to acknowledge and/or schedule downtime.
Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!
I should note that if I chmod 777 /usr/local/nagios/var/rw/nagios.cmd, I'm able to schedule down-time and to acknowledge without error.
I see though that this might not stick with a reboot. I guess I will just have to wait and see.
Re: Disabled Hosts Still Monitored
Posted: Fri Aug 10, 2012 9:19 am
by scottwilkerson
please run the following and return the output
Code: Select all
ls -l /usr/local/nagios/var/rw/nagios.cmd
cat /etc/group|grep nag
Also, as I have asked before
Did you try to recompile nagios core outside of one of the XI install or upgrade scripts?