Cannot change state on service attributes
Cannot change state on service attributes
Hello,
We are running NagiosXI 2014R2.6 and in the last few days are now experiencing a problem with changing anything on the service attributes.
There are some services that are currently passive checks that we need to set to active however when this is attempted, you get the error Please Wait - An error occurred processing your request.
Also, when doing an immediate check on services for a server the following error:
Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!
The permissions on the external command file and/or directory may be incorrect. Read the FAQs on how to setup proper permissions.
An error occurred while attempting to commit your command for processing.
Return from whence you came
The services can however be set to Active using the CCM without any problems.
Any help is appreciated.
We are running NagiosXI 2014R2.6 and in the last few days are now experiencing a problem with changing anything on the service attributes.
There are some services that are currently passive checks that we need to set to active however when this is attempted, you get the error Please Wait - An error occurred processing your request.
Also, when doing an immediate check on services for a server the following error:
Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!
The permissions on the external command file and/or directory may be incorrect. Read the FAQs on how to setup proper permissions.
An error occurred while attempting to commit your command for processing.
Return from whence you came
The services can however be set to Active using the CCM without any problems.
Any help is appreciated.
Re: Cannot change state on service attributes
Run the following commands and show us the output:
Code: Select all
ll -d /usr/local/nagios/var/rw
ll /usr/local/nagios/var/rw
grep check_external /usr/local/nagios/etc/nagios.cfg
grep nag /etc/groupBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Cannot change state on service attributes
Thanks. Please see output below for each of the commands
drwxrwsr-x. 2 nagios nagcmd 4096 May 15 10:16 /usr/local/nagios/var/rw
total 32
-rw-r--r-- 1 root nagcmd 136 May 15 13:45 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 May 15 10:16 nagios.qh
-rw-rw-r-- 1 nagios nagcmd 25969 May 5 19:40 nsca.dump
check_external_commands=1
nagios
500:nagios,apache,snmptt
nagcmd
501:nagios,apache,snmptt
Thanks again.
drwxrwsr-x. 2 nagios nagcmd 4096 May 15 10:16 /usr/local/nagios/var/rw
total 32
-rw-r--r-- 1 root nagcmd 136 May 15 13:45 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 May 15 10:16 nagios.qh
-rw-rw-r-- 1 nagios nagcmd 25969 May 5 19:40 nsca.dump
check_external_commands=1
nagios
nagcmd
Thanks again.
Re: Cannot change state on service attributes
These permissions are not correct. You need to have a "p" in there (pipeline file), i.e.-rw-r--r-- 1 root nagcmd 136 May 15 13:45 nagios.cmd
Code: Select all
prw-rw---- 1 nagios nagcmd 0 May 15 07:48 nagios.cmdBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Cannot change state on service attributes
Hi,
Thanks. I have just done a full restart of the system and the output is still the same.
total 32
-rw-r--r-- 1 root nagcmd 136 May 15 15:39 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 May 15 15:39 nagios.qh
-rw-rw-r-- 1 nagios nagcmd 25969 May 5 19:40 nsca.dump
Thanks. I have just done a full restart of the system and the output is still the same.
total 32
-rw-r--r-- 1 root nagcmd 136 May 15 15:39 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 May 15 15:39 nagios.qh
-rw-rw-r-- 1 nagios nagcmd 25969 May 5 19:40 nsca.dump
Re: Cannot change state on service attributes
Do you use traps in your environment? If so, an incoming trap may be forcing the pipe to be created before nagios can recreate on restart. This was fixed as of recently, so there is a patch if this is truly the case.
To test, stop the trap services, restart nagios, and then check the pipe permissions (post the output of the following):
To test, stop the trap services, restart nagios, and then check the pipe permissions (post the output of the following):
Code: Select all
service snmptt stop
service snmptrapd stop
ls -la /usr/local/nagios/var/rw/nagios.cmd
service nagios restart
ls -la /usr/local/nagios/var/rw/nagios.cmd
service snmptt start
service snmptrapd startFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Cannot change state on service attributes
Thanks very much.
Yes indeed you are correct. We do use snmp traps in our environment . The test works. Stopping snmptrapd and snmptt and restarting nagios resolved the issue.
At the moment, i have left both services off for now. Ho do we implement the fix to resolve the issue?
Thanks again.
Yes indeed you are correct. We do use snmp traps in our environment . The test works. Stopping snmptrapd and snmptt and restarting nagios resolved the issue.
At the moment, i have left both services off for now. Ho do we implement the fix to resolve the issue?
Thanks again.
Re: Cannot change state on service attributes
I believe this is the file you need:
Download it, unzip it and overwrite the original file in "/usr/local/bin/snmptraphandling.py". I would recommend backing up the original file first.
Let us know if this fixed your issue.
Download it, unzip it and overwrite the original file in "/usr/local/bin/snmptraphandling.py". I would recommend backing up the original file first.
Let us know if this fixed your issue.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Cannot change state on service attributes
Thanks
File backed up and replaced.
Nagios restarted and all issue resolved. Thanks for your help.
You can close this one.
File backed up and replaced.
Nagios restarted and all issue resolved. Thanks for your help.
You can close this one.
Re: Cannot change state on service attributes
I am glad to hear that! 
I am locking the topic.
I am locking the topic.
Be sure to check out our Knowledgebase for helpful articles and solutions!