Acknowledge service problem fails

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gabrotherton
Posts: 57
Joined: Wed Dec 03, 2014 11:16 am

Acknowledge service problem fails

Post by gabrotherton »

Hello everyone,

Yesterday I noticed a problem when I attempted to acknowledge service alerts. During the commit, after entering a comment, i get an error; the commit could not take place and the permissions on /usr/local/nagios/var/rw/nagios.cmd may be incorrect:

[root@sms1 rw]# ll
total 0
prw-rw----. 1 nagios nagcmd 0 Jun 24 17:05 nagios.cmd
srw-rw----. 1 nagios nagcmd 0 Jun 24 17:05 nagios.qh
[root@sms1 rw]# pwd
/usr/local/nagios/var/rw
[root@sms1 rw]#

Nagios XI 2014R2.7

So I change the permissions on nagios.cmd using chmod a+w, the commit works. But then later the permissions on the nagios.cmd named pipe default back to 660 and the commits fail again with the same error.

Is there something re-setting the permissions on that named pipe? What else could be causing the commits to fail?

I was loged in as nagiosadmin when I did these commits. I have not tried as a normal user.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Acknowledge service problem fails

Post by lmiltchev »

Can you run the following command and show us the output?

Code: Select all

grep nag /etc/group
Be sure to check out our Knowledgebase for helpful articles and solutions!
gabrotherton
Posts: 57
Joined: Wed Dec 03, 2014 11:16 am

Re: Acknowledge service problem fails

Post by gabrotherton »

This may be the problem. There was no output on the sms1 machine which hosts Nagios XI because all users are mounted using the autofs service.

[root@sms1 home]# pwd
/home
[root@sms1 home]# ls
geneb nagios
[root@sms1 home]# grep nag /etc/group
[root@sms1 home]#


On the machine where we administer users, I did add a nagios user and nagios / nagcmd groups, as follows:

[root@cm1 ~]# grep nag /etc/group
nagios:x:509:nagios
nagcmd:x:510:nagios
[root@cm1 ~]#

Would adding the proper nagios / nagcmd entries in the /etc/group file on sms1 fix the issue? I'm doing this all on the development system so trying things out doesn't break anything critical in my case.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Acknowledge service problem fails

Post by ssax »

They also need to be part of the apache or whatever group you run HTTPD as:

Code: Select all

nagios:x:500:nagios,apache
nagcmd:x:501:nagios,apache
Locked