Unable to apply configuration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
uofcmissouri
Posts: 20
Joined: Wed Apr 07, 2010 3:13 pm

Unable to apply configuration

Post by uofcmissouri »

We recently rebuilt our Nagios XI system (2.6) on RHEL 6.5 (VM) and everything was working as expected. We go back later to make a small change in the CCM to a host and when attempting to apply the configuration we get the error:

Command submitted for processing... (green)
Waiting for configuration verification.... (red)
Nagios restart command failed. (red)

An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint. I checked and I do see the host file in question has been modified so it seems to be applying the configuration anyways. Everything on the Monitoring Engine Process is green.

We restored the system from a VM Backup taken a few days ago and the issue was no longer there. We were able to apply configuration changes without issue. After waiting about 10 minutes or so, I attempted to apply something again and the error came back. Right now the server only has the default localhost configured.

I ran /usr/local/nagiosxi/scripts/reconfigure_nagios.sh and got the following:

Code: Select all

URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.login--2015-03-17 10:10:40--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

    [ <=>                                                                                                                    ] 11,254      --.-K/s   in 0.03s

2015-03-17 10:10:41 (357 KB/s) - “nagiosql.login” saved [11254]

LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
SETUID ROOT OK
RESETTING PERMS
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.login--2015-03-17 10:10:41--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

    [ <=>                                                                                                                    ] 11,254      --.-K/s   in 0.03s

2015-03-17 10:10:42 (407 KB/s) - “nagiosql.login” saved [11254]

LOGIN SUCCESSFUL!
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2015-03-17 10:10:42--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.export.monitoring”

    [  <=>                                                                                                                   ] 14,108      16.1K/s   in 0.9s

2015-03-17 10:10:44 (16.1 KB/s) - “nagiosql.export.monitoring” saved [14108]

WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
        Checked 8 services.
        Checked 1 hosts.
        Checked 1 host groups.
        Checked 0 service groups.
        Checked 3 contacts.
        Checked 2 contact groups.
        Checked 118 commands.
        Checked 9 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 1 hosts
        Checked 0 service dependencies
        Checked 0 host dependencies
        Checked 9 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.   
So it doesn't look like there is any errors or warnings in our configuration. I looked through the system logs and have not been able to find any changes made to the server or patches applied. Any help would be greatly appreciated.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Unable to apply configuration

Post by tmcdonald »

Go to Configure -> Core Config Manager, then on the left under Tools click Write Config Files. Then click Delete, then Write, then Verify and post a screenshot.
Former Nagios employee
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Unable to apply configuration

Post by BanditBBS »

Also, make sure your sudo is proper as I had this issue recently: http://support.nagios.com/forum/viewtop ... 16&t=31719
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
uofcmissouri
Posts: 20
Joined: Wed Apr 07, 2010 3:13 pm

Re: Unable to apply configuration

Post by uofcmissouri »

tmcdonald wrote:Go to Configure -> Core Config Manager, then on the left under Tools click Write Config Files. Then click Delete, then Write, then Verify and post a screenshot.
Here is the screenshot:
write-configs.png
You do not have the required permissions to view the files attached to this post.
uofcmissouri
Posts: 20
Joined: Wed Apr 07, 2010 3:13 pm

Re: Unable to apply configuration

Post by uofcmissouri »

BanditBBS wrote:Also, make sure your sudo is proper as I had this issue recently: http://support.nagios.com/forum/viewtop ... 16&t=31719

So I think it was an issue with the sudoers file. We have a GPO that updates it and it looks like someone broke it recently and then made a correction and it overwrote the sudoers file on the system. This caused all of the nagios entries to be removed. I added them back in and was able to apply the configuration successfully without errors. Thanks for your help!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to apply configuration

Post by ssax »

I'm glad you got that figured out, can we mark this as resolved and lock the topic?
uofcmissouri
Posts: 20
Joined: Wed Apr 07, 2010 3:13 pm

Re: Unable to apply configuration

Post by uofcmissouri »

ssax wrote:I'm glad you got that figured out, can we mark this as resolved and lock the topic?
Yes, thank you!
Locked