Page 1 of 1

Issue for unable apply configuration from nagiosxi

Posted: Wed Apr 08, 2015 1:36 am
by michaelli
Hi,

I hit a problem from "applying configuration" even I restore the configuration file from previous "monitoring configuration snapshots".

The action I taken can shown as below:

1. I click the restore icon and click "ok" for restore the NagiosQL database.
Date Snapshot Result File Actions
2015-04-01 12:08:14 Config Ok 1427861294.tar.gz

2. click "apply configuration" but error prompt as below

Applying Configuration

Command submitted for processing...
! Waiting for configuration verification....
! Backend login to the Core Config Manager failed.

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.

Below is the info. for "show config changes"
Write host configurations ...
Configuration file: EXCSCS01-Exchange.cfg successfully written!
WARNING! Ghost host config detected! Removing the file chkconf.cfg
Host configuration files successfully written!

Write service configurations ...
Configuration file: EXCSCS01-Exchange.cfg successfully written!
WARNING! Ghost service config detected! Removing the file cpsoap32.cfg.20150202.cfg
Service configuration files successfully written!

Configuration file: hostgroups.cfg successfully written!
Configuration file: servicegroups.cfg successfully written!
Configuration file: hosttemplates.cfg successfully written!
Configuration file: servicetemplates.cfg successfully written!
Configuration file: timeperiods.cfg successfully written!
Configuration file: commands.cfg successfully written!
Configuration file: contacts.cfg successfully written!
Configuration file: contactgroups.cfg successfully written!
Configuration file: contacttemplates.cfg successfully written!
Configuration file: servicedependencies.cfg successfully written!
Configuration file: hostdependencies.cfg successfully written!
Configuration file: serviceescalations.cfg successfully written!
Configuration file: hostescalations.cfg successfully written!
Configuration file: serviceextinfo.cfg successfully written!
Configuration file: hostextinfo.cfg successfully written!

Messages form "show errors"
Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/gssoap02.cfg', starting on line 260)

At this moment, we cannot add new host or service in nagiosxi. Could you have any idea for solving this problem and any idea to prevent this problem happening again?

Re: Issue for unable apply configuration from nagiosxi

Posted: Wed Apr 08, 2015 1:46 am
by Box293
It appears as there is an issue with a service assigned to gssoap02

Open the file:

Code: Select all

vi /usr/local/nagios/etc/services/gssoap02.cfg
Then type

Code: Select all

:260
and press Enter

This should show you what service it has issues with.

Go into CCM and disable that service.

Go into CCM
Tools > Write Config Files
Click the Delete button
It will say "Successfully deleted all Host / Service Config Files"
Click the Write Button
It will show an output of all the files it creates
Click the Verify button
The output should end with "Total Errors: 0"

Do you get 0 errors?

If you don't please go and resolve the highlighted problem and then perform the steps above again.

If you don't have any errors what happens when you Apply Config?
Quick Tools > Apply Configuration
Click the Apply Configuration button

Re: Issue for unable apply configuration from nagiosxi

Posted: Wed Apr 08, 2015 4:17 am
by michaelli
Hi Box293,

I have follow your procedure,

Go into CCM
Tools > Write Config Files
Click the Delete button
It will say "Successfully deleted all Host / Service Config Files"
Click the Write Button
It will show an output of all the files it creates
Click the Verify button
The output should end with "Total Errors: 0"

Do you get 0 errors? Answer: No error with verify success.

But same error when I click "apply configuration"

Re: Issue for unable apply configuration from nagiosxi

Posted: Wed Apr 08, 2015 11:00 am
by abrist
Are you a client? If so, please send an email to [email protected] with your profile.zip (admin --> system profile --> download) so that we can look over your full configuration.

Re: Issue for unable apply configuration from nagiosxi

Posted: Thu Apr 09, 2015 10:47 am
by tmcdonald
It looks like you are not a current client, so instead of emailing your profile can you PM it to me here on the forums?

In addition, please run the following as root on the Nagios XI machine and show the output:

Code: Select all

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

Re: Issue for unable apply configuration from nagiosxi

Posted: Fri Apr 10, 2015 2:38 am
by michaelli
Its work now after follow your command. Problem fixed. Thank you so much