Page 1 of 3

Nagios XI Config Failed

Posted: Thu Feb 16, 2017 5:03 am
by bosco
Hi I received following error message:

Error: Could not find any hostgroup matching 'corporate-linux-prod-servers' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 980)

I have completed below steps for configuration from nagios core to Nagios XI,

Completed Config Import Prep

Imported Configuration Files via ccm

while importing _multiple_host.cfg file getting an error

"You must enter a proper host name. You can not use the characters: \~!$%^&*"'|<>?,()=Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted

after checked Config File Management

written the configuration successfully

Write host configurations ...
Host configuration files successfully written!

Write service configurations ...
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!

But verifying file is gething Error

Error: Could not find any hostgroup matching 'corporate-linux-prod-servers' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 1105)

Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Could not find any hostgroup matching 'corporate-linux-prod-servers' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 1105)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

Re: Nagios XI Config Failed

Posted: Thu Feb 16, 2017 10:28 am
by rkennedy
I would look to make sure the hostgroup corporate-linux-prod-server actually got imported properly to the Nagios system. Did you follow these guides?

https://assets.nagios.com/downloads/nag ... p-Tool.pdf
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: Nagios XI Config Failed

Posted: Thu Feb 16, 2017 11:29 pm
by bosco
Thanks for your reply,

I have followed the shared the steps on the document.do i need to import _multiple_host.cfg also

Re: Nagios XI Config Failed

Posted: Fri Feb 17, 2017 3:08 am
by bosco
I tried with importing in the below order

imported hostgroup.cfg
imported host.cfg
imported _multiple_hosts

1 items failed to import successfully Hide Details
You must enter a proper host name. You can not use the characters: \~!$%^&*"'|<>?,()=Entry name::corporate_linux_prod_services_template inside tbl_servicetemplate successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted
Entry config_name::_multiple_hosts inside tbl_service successfully inserted

Re: Nagios XI Config Failed

Posted: Fri Feb 17, 2017 3:01 pm
by mcapra
Can you show us the definition for corporate_linux_prod_services_template? The import tool in the GUI can be a bit stingy at times regardless of whether or not a given character is valid within Nagios Core.

Re: Nagios XI Config Failed

Posted: Tue Feb 21, 2017 1:18 am
by bosco
HI,

This is copy of corporate_linux_prod_services_template,this is defined in services.cfg file in nagios core definition.

Code: Select all

define service{
        name                            corporate_linux_prod_services_template   ; The 'name' of this service template
        active_checks_enabled           1                       ; Active service checks are enabled
        passive_checks_enabled          1                       ; Passive service checks are enabled/accepted
        parallelize_check               1                       ; Active service checks should be parallelized (disabling this can lead to major performance problems)
        obsess_over_service             1                       ; We should obsess over this service (if necessary)
        check_freshness                 0                       ; Default is to NOT check service 'freshness'
        notifications_enabled           0                       ; Service notifications are enabled
        event_handler_enabled           1                       ; Service event handler is enabled
        flap_detection_enabled          1                       ; Flap detection is enabled
        process_perf_data               1                       ; Process performance data
        retain_status_information       1                       ; Retain status information across program restarts
        retain_nonstatus_information    1                       ; Retain non-status information across program restarts
        is_volatile                     0                       ; The service is not volatile
        check_period                    24x7                    ; The service can be checked at any time of the day
        max_check_attempts              3                       ; Re-check the service up to 3 times in order to determine its final (hard) state
        normal_check_interval           30                       ; Check the service every 10 minutes under normal conditions
        retry_check_interval            2                       ; Re-check the service every two minutes until a hard state can be determined
        contact_groups                  service-corporate-process-p3-tservtau-admins             ; Notifications get sent out to everyone in the 'admins' group
        notification_options            w,u,c,r                 ; Send notifications about warning, unknown, critical, and recovery events
        notification_interval           0                       ; Re-notify about service problems every hour
        notification_period             24x7                    ; Notifications can be sent out at any time
        register                        0                       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
        }

Re: Nagios XI Config Failed

Posted: Tue Feb 21, 2017 4:42 pm
by mcapra
Can you share the full contents of _multiple_host.cfg? Feel free to PM it if sensitive information is contained within,

Can you also send over a full system profile? From the Nagios XI GUI, you can gather a profile via Admin -> System Profile -> Download Profile.

There's probably some small thing that needs to be changed, but it'd be much faster to diagnose that if we as techs had the full configuration set being evaluated.

Re: Nagios XI Config Failed

Posted: Fri Feb 24, 2017 6:19 am
by bosco
Hi,

I have Send the requested details over PM.please check

Mod Edit: Files stored for techs in shared drive

Re: Nagios XI Config Failed

Posted: Fri Feb 24, 2017 2:40 pm
by mcapra
It looks as though the corporate-linux-prod-server hostgroup hasn't made it into the config set yet. Have you verified this hostgroup is defined in the Core Config Manager?

Can you share the output of the following command executed from the CLI of your Nagios XI machine:

Code: Select all

echo 'SELECT * FROM tbl_hostgroup;' | mysql -uroot -pnagiosxi nagiosql

Re: Nagios XI Config Failed

Posted: Fri Mar 03, 2017 4:57 am
by bosco
HI I have,


deleted previous import configuration and now preparing for a fresh import.Please advise in which priority should i go with import.i have attached