Page 1 of 1

Acknowledge service problem fails

Posted: Thu Jun 25, 2015 9:21 am
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.

Re: Acknowledge service problem fails

Posted: Thu Jun 25, 2015 11:18 am
by lmiltchev
Can you run the following command and show us the output?

Code: Select all

grep nag /etc/group

Re: Acknowledge service problem fails

Posted: Fri Jun 26, 2015 7:43 am
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.

Re: Acknowledge service problem fails

Posted: Fri Jun 26, 2015 9:18 am
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