When I try to disable notification for any host it shows error as "Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!".
Sharing screenshots for your reference.
Error: Could not open command file '/usr/local/nagios/var/rw
-
tanay.more
- Posts: 2
- Joined: Mon Dec 04, 2017 11:08 am
Error: Could not open command file '/usr/local/nagios/var/rw
- Attachments
-
- Capture.PNG (11.04 KiB) Viewed 6139 times
Re: Error: Could not open command file '/usr/local/nagios/va
What documentation did you use to install Nagios Core?
The "Install Command Mode" step of the official documentation typically takes care of this. Can you share the output of the following command executed from the CLI of your Nagios Core machine:
If you attempted to create that file by hand, know that it must exist as a named pipe with the sticky-bit set in the permissions.
To set the sticky-bit by hand:
The "Install Command Mode" step of the official documentation typically takes care of this. Can you share the output of the following command executed from the CLI of your Nagios Core machine:
Code: Select all
ls -al /usr/local/nagios/var/rw/To set the sticky-bit by hand:
Code: Select all
chmod g+s /usr/local/nagios/var/rw/Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Error: Could not open command file '/usr/local/nagios/va
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
tanay.more
- Posts: 2
- Joined: Mon Dec 04, 2017 11:08 am
Re: Error: Could not open command file '/usr/local/nagios/va
Thanks for your help.
Please find status on your query below.
What documentation did you use to install Nagios Core?
>>I am sharing my document which I used to installed Nagios Server.
ls -al /usr/local/nagios/var/rw/
[root@blpmweb15 ~]# ls -al /usr/local/nagios/var/rw/
total 4
drwxrwsr-x 2 nagios nagcmd 39 Dec 5 10:11 .
drwxrwxr-x 5 nagios nagios 4096 Dec 5 10:12 ..
prw-rw---- 1 nagios nagcmd 0 Dec 5 10:11 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 Dec 5 10:11 nagios.qh
I tried "chmod g+s /usr/local/nagios/var/rw/" this but still no fix.
Please find status on your query below.
What documentation did you use to install Nagios Core?
>>I am sharing my document which I used to installed Nagios Server.
ls -al /usr/local/nagios/var/rw/
[root@blpmweb15 ~]# ls -al /usr/local/nagios/var/rw/
total 4
drwxrwsr-x 2 nagios nagcmd 39 Dec 5 10:11 .
drwxrwxr-x 5 nagios nagios 4096 Dec 5 10:12 ..
prw-rw---- 1 nagios nagcmd 0 Dec 5 10:11 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 Dec 5 10:11 nagios.qh
I tried "chmod g+s /usr/local/nagios/var/rw/" this but still no fix.
Re: Error: Could not open command file '/usr/local/nagios/va
Another thing to check is to make sure the nagios user account and the apache user account is added to the nagcmd group and the nagios group on the server.
To do this, edit the following file
And make sure the nagios and nagcmd groups are configured like the example below.
This should allow the nagios user and the apache user account access to that folder and it's files.
To do this, edit the following file
Code: Select all
/etc/groupCode: Select all
nagios:x:1000:nagios,apache
nagcmd:x:1001:nagios,apache
Be sure to check out our Knowledgebase for helpful articles and solutions!