Nagios XI Configuration Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Nagios XI Configuration Error

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios XI Configuration Error

Post by scottwilkerson »

Lets run the following and report the output

Code: Select all

cd /usr/local/nagiosxi/scripts/
./reconfigure_nagios.sh
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Nagios XI Configuration Error

Post 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
--------------------------------------
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios XI Configuration Error

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Nagios XI Configuration Error

Post by emartine »

The problem still exists after running the reconfigure script.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI Configuration Error

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Nagios XI Configuration Error

Post 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.
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Nagios XI Configuration Error

Post by emartine »

Here is the written configs after clicking deleted files
You do not have the required permissions to view the files attached to this post.
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: Nagios XI Configuration Error

Post by emartine »

This is what I get when hitting Verify Files
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI Configuration Error

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked