Page 1 of 2
Nagios XI Configuration Error
Posted: Tue Jan 15, 2019 4:05 pm
by emartine
One of my collegues was adding a configuration to our nagios test server (Nagiosxi 5.5.8) and left on vacation. I wanted to apply some new checks to the server only to find an error in the configuration. The odd thing is that the error is blank and although the written configs appear to be successfully written I see "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." The snapshot command output is empty but it does show 2019-01-15 14:53:44 Config Error 1547585624.tar.gz
What log can show me what may be happening?
Re: Nagios XI Configuration Error
Posted: Tue Jan 15, 2019 4:51 pm
by scottwilkerson
Lets run the following and report the output
Code: Select all
cd /usr/local/nagiosxi/scripts/
./reconfigure_nagios.sh
Re: Nagios XI Configuration Error
Posted: Tue Jan 15, 2019 5:11 pm
by emartine
Here is what I got back.
./reconfigure_nagios.sh
--- reset_config_perms.sh ------------
> Setting CCM script permissions
> Setting script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting NOM checkpoint user:group permissions
> + Setting Nagios Core corelog.newobjects user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------
--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
No files to import
--------------------------------------
--- ccm_export.php -------------------
> Writing CCM configuration to Nagios files
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nagiosim/nagiosim.inc.php on line 491
Finished writing out configuraton
--------------------------------------
--------------------------------------
> Verifying configuration with Nagios Core
> Output:
> Return Code: 139
--------------------------------------
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /usr/local/nagiosxi/scripts
tar: Removing leading `/' from member names
/usr/local/nagiosxi/scripts
LATEST NOM SNAPSHOT: /usr/local/nagiosxi/nom/checkpoints/nagioscore/1545336654.tar.gz
/ /usr/local/nagiosxi/scripts
RESTORING NOM SNAPSHOT : /usr/local/nagiosxi/nom/checkpoints/nagioscore/1545336654.tar.gz
/usr/local/nagiosxi/scripts
--- reset_config_perms.sh ------------
> Setting CCM script permissions
> Setting script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting NOM checkpoint user:group permissions
> + Setting Nagios Core corelog.newobjects user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------
Re: Nagios XI Configuration Error
Posted: Tue Jan 15, 2019 5:16 pm
by scottwilkerson
Your config did not verify successfully.
Go to Configure, CCM -> Tools -> Config File Management
Click Delete Files
Write Configs
Verify Files
Work through any errors then repeat the process until the config verifies successfully.
Then Apply Configuration
Re: Nagios XI Configuration Error
Posted: Tue Jan 15, 2019 5:20 pm
by emartine
The problem still exists after running the reconfigure script.
Re: Nagios XI Configuration Error
Posted: Tue Jan 15, 2019 5:30 pm
by lmiltchev
Do you see any errors in the web UI after following the steps, recommended by @scottwilkerson?
Code: Select all
Go to Configure, CCM -> Tools -> Config File Management
Click Delete Files
Write Configs
Verify Files
Can you show us a screenshot?
Re: Nagios XI Configuration Error
Posted: Tue Jan 15, 2019 5:35 pm
by emartine
When I wrote the configs it gave me a long list of host , service and groups that applied successfully. When I click on verify files I get a blank square.
I poked around a few places on the web interface and when I got to the audit log ... Not sure if this has anything to do with the issue we are experiencing.... but our test server that has the same license as our prod and dr servers is getting the following error.
This feature is part of the Enterprise Edition of Nagios XI. Your trial of this feature has expired. Some functionality may be limited or disabled. Enter your enterprise key or learn more about upgrading to Enterprise Edition.
I looked at the licensing expiration date which shows current and Activation Status is Activated.
Re: Nagios XI Configuration Error
Posted: Tue Jan 15, 2019 5:39 pm
by emartine
Here is the written configs after clicking deleted files
Re: Nagios XI Configuration Error
Posted: Tue Jan 15, 2019 5:41 pm
by emartine
This is what I get when hitting Verify Files
Re: Nagios XI Configuration Error
Posted: Tue Jan 15, 2019 5:42 pm
by lmiltchev
Can you run the following commands from the command line and show the output?
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
echo $?
df -h
chage nagios -l
sestatus