fail to apply configuration changes

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
iwang
Posts: 41
Joined: Tue Nov 12, 2019 1:22 pm

fail to apply configuration changes

Post by iwang »

HI
I have reverted the configuration to a good point. I didn't do any configuration for the resource that the screenshot mentioned but it keep complain the error. I had checked the cfg file which already has the hostgroup defined.
please help. i am also attaching the log.

Code: Select all

# tail -f /usr/local/nagiosxi/var/cmdsubsys.log
These options need to match
 in Unknown on line 0
............................................................PHP Warning:  PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0

PROCESSED 0 COMMANDS
..................................PROCESSING COMMAND ID 22300...
PROCESS COMMAND: CMD=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
PHP Warning:  PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
No entry for terminal type "unknown";
using dumb terminal settings.

--- 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
--------------------------------------
PHP Warning:  PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0

--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
PHP Notice:  Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 551
PHP Notice:  Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 905
PHP Warning:  PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
  - Importing: /usr/local/nagios/etc/import/H12Z3Y2.corp.intusurg.com.cfg .. ERROR
   Duplicate entry '1' for key 'config_name'Entry host_name:: inside tbl_host could not be inserted: Duplicate entry '1' for key 'config_name'<br>
--------------------------------------

Importing into the CCM failed!
OUTPUT=Importing into the CCM failed!
RETURNCODE=2
PHP Warning:  preg_match(): Unknown modifier 'Q' in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/get_config_string.inc.php on line 69
PHP Warning:  preg_match(): Unknown modifier 'Q' in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/get_config_string.inc.php on line 69
../usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/get_config_string.inc.php on line 69
PHP Warning:  preg_match(): Unknown modifier 'Q' in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/get_config_string.inc.php on line 69
<span class='error'>Unable to find group in config file, no changes made.</span><br /><span class='error'>Unable to find group in config file, no changes made.</span><br /><span class='error'>Unable to find group in config file, no changes made.</span><br /><span class='error'>Unable to find group in config file, no changes made.</span><br /><p>Backup successfully created.<
/usr/local/nagios/etc/services/FMS\ DEV\ Linux\ CPU\ Ideal\ Percentage.cfg

Code: Select all

define service {
    service_description         FMS DEV Linux CPU Ideal Percentage
    use                         xiwizard_nrpe_service
    hostgroup_name              FMS_HG_DEV_Silver
    display_name                FMS DEV Linux CPU Ideal Percentage
    check_command               check_nrpe!cpu_ideal_check!!!!!!!
    max_check_attempts          3
    check_interval              1
    retry_interval              1
    active_checks_enabled       1
    check_period                xi_timeperiod_24x7
    notification_interval       60
    first_notification_delay    0
    notification_period         xi_timeperiod_24x7
    notifications_enabled       1
    contacts                    p2_fms_warn_ops
    _xiwizard                   linux-server
    register                    1
}

You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: fail to apply configuration changes

Post by scottwilkerson »

Lets run the following

Code: Select all

rm -f /usr/local/nagios/etc/import/*.cfg
Then try to apply configuration again
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
iwang
Posts: 41
Joined: Tue Nov 12, 2019 1:22 pm

Re: fail to apply configuration changes

Post by iwang »

thanks. the error went away after reboot the server.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: fail to apply configuration changes

Post by scottwilkerson »

iwang wrote:thanks. the error went away after reboot the server.
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked