Commands from interface not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vazudevan
Posts: 36
Joined: Fri Oct 21, 2016 4:52 am

Commands from interface not working

Post by vazudevan »

After reverting back from 5.5 to 5.4.13 command submissions, such as disable notification are failing. Attached the image. How do we get this back working?
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Commands from interface not working

Post by lmiltchev »

Can you describe in details all of the steps that you took in order to revert back from from 5.5 to 5.4.13? Did you have the same problem prior to upgrading to 5.5? Is this happening for all users, some users, or one user only? What are the security settings of the user in question (Admin > Manage Users > Edit)?

Start a running tail on the cmdsubsys.log:

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
then log in as your user, click on a host or a service, then click on the "Disable notifications" link under the "Quick Action" section. Wait until there is some output in the log, stop the tail (ctrl+c), copy and paste the output to the forum.
Be sure to check out our Knowledgebase for helpful articles and solutions!
vazudevan
Posts: 36
Joined: Fri Oct 21, 2016 4:52 am

Re: Commands from interface not working

Post by vazudevan »

The problem appears to have resolved now after a reboot of the nagios host. The reboot was intact done for a different purpose. So I could not get to check the subsystem logs.

The method used to restore to 5.4.13 was running the /usr/local/nagiosxi/scripts/restore_xi.sh from command line with the autobackup file that was generated as part of the upgrade process.

After upgrade we noticed a couple of random issues, especially related to reload of nagios service. We faced the similar as reported in https://support.nagios.com/kb/article/n ... es-34.html After Apply configs changes were reflecting in CCM but not in status pages and so on.

It turned out, reconfigure_nagios.sh (Apply config), was not able to find the lock file. the path for lock file in init scripts were point to a different location than in nagios.cfg.

Code: Select all

NagiosRunFile=/var/run/nagios.lock
pointing to correct file resolved the service stop and status commands, but start would fail. Hence for now as a workaround have added this to stop and status function.

Code: Select all

stop)
    echo -n "Stopping nagios: "
    NagiosRunFile=/usr/local/nagios/var/nagios.lock
...
...
status)
    NagiosRunFile=/usr/local/nagios/var/nagios.lock
...
Maybe the init scripts were not restored while restoring backup.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Commands from interface not working

Post by lmiltchev »

The nagios.lock should be in /var/run on an upgraded system.

Code: Select all

grep nagios.lock /etc/init.d/nagios /usr/local/nagios/etc/nagios.cfg
/etc/init.d/nagios:NagiosRunFile=/var/run/nagios.lock
/usr/local/nagios/etc/nagios.cfg:lock_file=/var/run/nagios.lock
Anyway, I am glad that your issue has been resolved! Is it OK if we close this topic?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked