Page 1 of 1

CCM Apply failure

Posted: Wed Jul 22, 2015 3:10 pm
by drug
I just installed XI (2014R2.7) on CentOS7 and have only made very minimal CCM changes (added a group, cloned a service template). When I attempt to "Apply Configuration", I receive the following verbiage:
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.
If I click on "Show Errors", an empty red box appears. I don't see anything helpful in the Apache error logs during this time other than the following:
[Wed Jul 22 16:06:26.985433 2015] [:error] [pid 27301] [client ::1:52141] PHP Notice: Undefined index: language in /usr/local/nagiosxi/html/includes/components/ccm/includes/common_functions.inc.php on line 710
I Restored the latest "Config Ok" snapshot but when I Apply this configuration I still receive the same error.

Can anyone point me in the right direction for resolution?

Thank you.

Re: CCM Apply failure

Posted: Wed Jul 22, 2015 3:13 pm
by tmcdonald
Go to Configure -> Core Config Manager, then on the left under Tools click Write Config Files. Then click Verify and post a screenshot.

Re: CCM Apply failure

Posted: Wed Jul 22, 2015 3:20 pm
by drug
Screen Shot 2015-07-22 at 3.16.42 PM.png

Re: CCM Apply failure

Posted: Wed Jul 22, 2015 3:22 pm
by tmcdonald
Okay, and now please run the following commands as root from the Nagios server command line and post the results:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh | tail -20

Re: CCM Apply failure

Posted: Wed Jul 22, 2015 3:30 pm
by drug
tmcdonald wrote:Okay, and now please run the following commands as root from the Nagios server command line and post the results:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh | tail -20
Here's the output:
[root@c4 httpd]# cd /usr/local/nagiosxi/scripts
You have new mail in /var/mail/root
[root@c4 scripts]# ./reconfigure_nagios.sh | tail -20
--2015-07-22 16:27:00-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’

[ <=> ] 11,261 --.-K/s in 0.007s

2015-07-22 16:27:00 (1.60 MB/s) - ‘nagiosql.login’ saved [11261]

--2015-07-22 16:27:00-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’

[ <=> ] 11,261 --.-K/s in 0.007s

2015-07-22 16:27:00 (1.46 MB/s) - ‘nagiosql.login’ saved [11261]

--2015-07-22 16:27:00-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.export.monitoring’

[ <=> ] 14,108 14.8KB/s in 0.9s

2015-07-22 16:27:02 (14.8 KB/s) - ‘nagiosql.export.monitoring’ saved [14108]

Checked 5 contacts.
Checked 3 contact groups.
Checked 118 commands.
Checked 11 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 11 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
[root@c4 scripts]#

Re: CCM Apply failure

Posted: Wed Jul 22, 2015 3:52 pm
by drug
I should have heeded the warning that root had mail. It seems that Nagios modifies /etc/sudoers (as does our Puppet client). I'm certain this is the problem. Thank you for your assistance.

Re: CCM Apply failure

Posted: Wed Jul 22, 2015 4:12 pm
by drug
I have confirmed this was the case. I re-added the entries from nagiosxi/nagiosxi.sudoers (added them instead to sudoers.d/nagiosxi) and all is well.
drug wrote:I should have heeded the warning that root had mail. It seems that Nagios modifies /etc/sudoers (as does our Puppet client). I'm certain this is the problem. Thank you for your assistance.

Re: CCM Apply failure

Posted: Wed Jul 22, 2015 4:23 pm
by tmcdonald
I'll be closing this thread now, but feel free to open another if you need anything in the future!