Page 1 of 2

Apply Config throws error but says no error

Posted: Wed Aug 09, 2017 9:03 am
by SavaSC
Hello,

Have a weird one. I made some changes to Nagios and tried to apply the config. It failed and says there was an error. I click on the "Show Error" button and I just get a highlighted line with no text. I have attached a screenshot, an audit log of the last 24 hours, and the system profile.

Please take a look and see if you can see the issue.

Thanks.

Re: Apply Config throws error but says no error

Posted: Wed Aug 09, 2017 9:55 am
by bolson
Please run the following command from the command line and post your result:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Re: Apply Config throws error but says no error

Posted: Wed Aug 09, 2017 10:10 am
by SavaSC
bolson wrote:Please run the following command from the command line and post your result:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
OK, please find it attached.

I saw the warnings about the partition checks on the Nagios server. I corrected those and tried to apply but had the same result.

Thanks.

Re: Apply Config throws error but says no error

Posted: Wed Aug 09, 2017 12:53 pm
by bolson

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Can you run this again and post the result?

Re: Apply Config throws error but says no error

Posted: Wed Aug 09, 2017 2:46 pm
by SavaSC
bolson wrote:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Can you run this again and post the result?

Ummm... OK. Here you go.

Re: Apply Config throws error but says no error

Posted: Wed Aug 09, 2017 3:19 pm
by bolson
I think these configuration warnings could be the culprit. Please attach your /usr/local/nagios/etc/nagios.cfg.

Thank you!

Re: Apply Config throws error but says no error

Posted: Thu Aug 10, 2017 7:40 am
by SavaSC
Here you go. Thank you for looking.

Re: Apply Config throws error but says no error

Posted: Thu Aug 10, 2017 9:06 am
by mcapra
It may also be helpful to see the output of the following command executed from the CLI of your Nagios XI machine:

Code: Select all

/usr/local/nagiosxi/scripts/reconfigure_nagios.sh

Re: Apply Config throws error but says no error

Posted: Thu Aug 10, 2017 9:25 am
by SavaSC
mcapra wrote:It may also be helpful to see the output of the following command executed from the CLI of your Nagios XI machine:

Code: Select all

/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
OK. I had to take 2 screen shots to get it all. Capture1.PNG is the last of the output.

Re: Apply Config throws error but says no error

Posted: Thu Aug 10, 2017 2:26 pm
by lmiltchev
Do you see any config errors when go to the CCM > Tools > Config File Management, and click on the following buttons in the exact same order: Delete Files, Write Configs, and Verify Files?

If you don't see any errors, try to apply configuration. If this still fails, run the following commands, and show the output:

Code: Select all

chage -l nagios
chage -l apache
sestatus
ls -la /usr/local/nagiosxi/scripts/nagiosql*
Also, start a running tail on the cmdsubsys.log, and redirect the output to a text file:

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log &> /tmp/debug.txt
While the tail is running, apply configuration in the web UI. When this is done (you see an error in the web UI), go back to the terminal, and stop the tail by pressing "Ctrl + c". Next, post the "debug.txt" file that was generated in the "/tmp" directory.