Apply Configuration fails after update to 5.5.1

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
onetruebob74
Posts: 13
Joined: Wed Sep 06, 2017 8:29 pm

Apply Configuration fails after update to 5.5.1

Post by onetruebob74 »

Hello,

Today I upgraded Nagios XI from 5.4.13 to 5.5.1. The upgrade ran fine once I ran the script to repair the databases. I started to test the limited access to CCM functionality and ran into an issue when I tried to Apply Configuration after creating a new service. The service referenced in the error message is not the one I just created and has existed and worked just fine up until now. The only changes I made after the upgrade was adding a user and adding a new service. Here is the error message I receive when I try to Apply Configuration:

Code: Select all

Apply Configuration
Configuration import 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.
  Try Again
Error: Invalid max_attempts, check_interval, retry_interval, or notification_interval value for service 'HTTPS collab.itc' on host 'Load-Balancer'
Error: Could not register service (config file '/usr/local/nagios/etc/services/https_collab.itc.cfg', starting on line 16)
In trying to troubleshoot the issue I went in and set hard values (they had previously just been inherited from templates) for max_attempts, check_interval, retry_interval and notification_interval and attempted to Apply Configuration after each change to no effect. I then went in and deleted the service from inside of CCM, tried to Apply Configuration, and *still* am receiving the same error. The service no longer appears in the CCM interface.

I've even went so far as to check the nagiosql database in mysql and ran the command:

select * from tbl_service where config_name like '%collab%';

And it only shows the SSL cert check for collab.itc, whereas the service I deleted was named https_collab.itc

At this point I am at a loss as to how to proceed and hope someone here can point me in the correct direction.

Thanks,
Bob
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Apply Configuration fails after update to 5.5.1

Post by rajasegar »

I can assure you this in not specific to 5.5.1, I encountered this a few times in the older versions.

CCM > Tools -> Config File Management

1) Delete Files
2) Write Files (might need to do a few times, it tends to time out)
3) Verify Files
4) Apply Config

Good luck.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
onetruebob74
Posts: 13
Joined: Wed Sep 06, 2017 8:29 pm

Re: Apply Configuration fails after update to 5.5.1

Post by onetruebob74 »

So I was able to go through the four steps in CCM > Tools -> Config File Management you mention and that does work, I can delete, write, verify and restart and the service I deleted is actually gone as far as the written configs. However, I am still receiving the same error when I try to 'Apply Configuration'.

One other issue I'm having is that in the XI System Component Status table, the following services are all showing with the red exclamation point:

Monitoring Engine
Performance Grapher
Database Backend

When I try to Start the service from the gear wheel, I always receive the message "An error occurred processing your request." However, when I actually check the status of the mariadb, ndo2db, nagios and npcd services both with systemctl and the manage_services.sh script they are all showing as running with a normal status.

I've also tried just rebooting the entire server to make sure there were no stray extra processes mucking things up and the problem persists.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Apply Configuration fails after update to 5.5.1

Post by scottwilkerson »

can you run the following and report the output

Code: Select all

su - nagios
cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
onetruebob74
Posts: 13
Joined: Wed Sep 06, 2017 8:29 pm

Re: Apply Configuration fails after update to 5.5.1

Post by onetruebob74 »

The output for how you asked me to run it is this:

Code: Select all

# su - nagios
su: ignore --preserve-environment, it's mutually exclusive to --login.
Last login: Wed Jul 25 12:28:47 EDT 2018
Last failed login: Wed Jul 25 12:30:05 EDT 2018
There were 2 failed login attempts since the last successful login.
[nagios@nagiosxi01 ~]$ cd /usr/local/nagiosxi/scripts/
[nagios@nagiosxi01 scripts]$ ./reconfigure_nagios.sh

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for nagios:
Sorry, user nagios is not allowed to execute '/usr/local/nagiosxi/scripts/reset_config_perms.sh' as root on nagiosxi01.its.virginia.edu.

Resetting configuration permissions failed!
I ran reconfigure_nagios.sh as root and received the following output:

Code: Select all

--- 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 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
  Finished writing out configuraton
--------------------------------------

--------------------------------------
> Verifying configuration with Nagios Core
> Output:
Nagios Core 4.4.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2018-06-25
License: GPL

Website: https://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 2813 services.
Warning: Host 'Load-Balancer' has no default contacts or contactgroups defined!
        Checked 307 hosts.
        Checked 23 host groups.
        Checked 0 service groups.
        Checked 20 contacts.
        Checked 17 contact groups.
        Checked 136 commands.
        Checked 31 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 307 hosts
        Checked 0 service dependencies
        Checked 0 host dependencies
        Checked 31 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 1
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
> Return Code: 0
--------------------------------------
The behavior when I try to Apply Configuration is unchanged.
onetruebob74
Posts: 13
Joined: Wed Sep 06, 2017 8:29 pm

Re: Apply Configuration fails after update to 5.5.1

Post by onetruebob74 »

Okay, did some more digging and found that there were no NAGIOSXI entries in sudoers. I copied them over from the xi-latest tarball and things appear to be working correctly again. Thanks for the help.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Apply Configuration fails after update to 5.5.1

Post by npolovenko »

@onetruebob74, Thanks for the update. I will be closing this ticket as resolved.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked