Disabled Hosts Still Monitored

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Disabled Hosts Still Monitored

Post 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?
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Disabled Hosts Still Monitored

Post 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?
Nicholas Scott
Former Nagios employee
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Disabled Hosts Still Monitored

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Disabled Hosts Still Monitored

Post by scottwilkerson »

please attach your file locate at

Code: Select all

/etc/init.d/nagios
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Disabled Hosts Still Monitored

Post by jbennett »

Please find attached.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Disabled Hosts Still Monitored

Post 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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Disabled Hosts Still Monitored

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Disabled Hosts Still Monitored

Post by scottwilkerson »

Where are you finding these solution? I searched our whole forum for "nagiocmd" and only found this thread...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Disabled Hosts Still Monitored

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Disabled Hosts Still Monitored

Post 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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked