Page 4 of 7

Re: nagiosxi stuck at applying configuration

Posted: Thu Jan 09, 2014 12:52 pm
by nanz28v
I removed all host escalation from Nagios and write to config file successfully. However verify config failed with "no host" and "no service error". I tried to add a host "al1cmsch01" and this is what I get at verify config. I'm also attaching the al1cmsch01.cfg file:

Error: Invalid max_check_attempts value for host 'al1cmsch01'
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/al1cmsch01.cfg', starting on line 14)

Nagios Core 3.5.0
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-15-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/hostgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/servicegroups.cfg'...
Processing object config file '/usr/local/nagios/etc/hosttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicetemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicedependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostdependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/hostescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostextinfo.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceextinfo.cfg'...
Processing object config directory '/usr/local/nagios/etc/hosts'...
Processing object config file '/usr/local/nagios/etc/hosts/al1cmsch01.cfg'...
Processing object config directory '/usr/local/nagios/etc/services'...
Error: Invalid max_check_attempts value for host 'al1cmsch01'
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/al1cmsch01.cfg', starting on line 14)
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: nagiosxi stuck at applying configuration

Posted: Thu Jan 09, 2014 1:01 pm
by lmiltchev
Go to the CCM->Hosts, and click on the "al1cmsch01" host to modify it. Click on "Manage Templates", select "xiwizard_generic_host"->Add Selected->Close->Save. Verify your configuration again via the "Write Config Tool". It there are no errors, apply configuration.

Re: nagiosxi stuck at applying configuration

Posted: Thu Jan 09, 2014 2:25 pm
by nanz28v
I did these and at verify config it says:

Code: Select all

Error: There are no services defined! 

Nagios Core 3.5.0 
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors 
Copyright (c) 1999-2009 Ethan Galstad 
Last Modified: 03-15-2013 
License: GPL 

Website: http://www.nagios.org 
Reading configuration data... 
Read main config file okay... 
Processing object config directory '/usr/local/nagios/etc/static'... 
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'... 
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'... 
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'... 
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'... 
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'... 
Processing object config file '/usr/local/nagios/etc/contacts.cfg'... 
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'... 
Processing object config file '/usr/local/nagios/etc/commands.cfg'... 
Processing object config file '/usr/local/nagios/etc/hostgroups.cfg'... 
Processing object config file '/usr/local/nagios/etc/servicegroups.cfg'... 
Processing object config file '/usr/local/nagios/etc/hosttemplates.cfg'... 
Processing object config file '/usr/local/nagios/etc/servicetemplates.cfg'... 
Processing object config file '/usr/local/nagios/etc/servicedependencies.cfg'...
 Processing object config file '/usr/local/nagios/etc/serviceescalations.cfg'...
 Processing object config file '/usr/local/nagios/etc/hostdependencies.cfg'... 
Processing object config file '/usr/local/nagios/etc/hostescalations.cfg'... 
Processing object config file '/usr/local/nagios/etc/hostextinfo.cfg'... 
Processing object config file '/usr/local/nagios/etc/serviceextinfo.cfg'... 
Processing object config directory '/usr/local/nagios/etc/hosts'... 
Processing object config file '/usr/local/nagios/etc/hosts/al1cmsch01.cfg'... 
Processing object config directory '/usr/local/nagios/etc/services'... 
Read object config files okay... 

Running pre-flight check on configuration data... 

Checking services... 
Error: There are no services defined! 
Checked 0 services. 
Checking hosts... 
Warning: Host 'al1cmsch01' has no default contacts or contactgroups defined! 
Checked 1 hosts. 
Checking host groups... 
Checked 9 host groups. 
Checking service groups... 
Checked 3 service groups. 
Checking contacts... 
Checked 3 contacts. 
Checking contact groups... 
Checked 2 contact groups. 
Checking service escalations... 
Checked 0 service escalations. 
Checking service dependencies... 
Checked 0 service dependencies. 
Checking host escalations... 
Checked 0 host escalations. 
Checking host dependencies... 
Checked 0 host dependencies. 
Checking commands... 
Checked 109 commands. 
Checking time periods... 
Checked 12 time periods. 
Checking for circular paths between hosts... 
Checking for circular host and service dependencies... 
Checking global event handlers... 
Checking obsessive compulsive processor commands... 
Checking misc settings... 

Total Warnings: 1 
Total Errors: 1 

***> One or more problems was encountered while running the pre-flight check... 

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. 
I then created a test service, but still get the same no service error:

http://technet.microsoft.com/en-us/libr ... 81005.aspx

Configuration Manager 2007 clients cannot be assigned to secondary sites; they are always assigned to the parent primary site. However, if they reside in the boundaries of the secondary site, they can take advantage of any proxy management points and distribution points at the secondary site.

Re: nagiosxi stuck at applying configuration

Posted: Thu Jan 09, 2014 2:31 pm
by abrist
Did you remove the localhost checks? If so, please do not do this.
Create a new service check and apply it to a host. Then try to apply configuration again. If it fails, post the output of the verification once again.

Re: nagiosxi stuck at applying configuration

Posted: Thu Jan 09, 2014 2:36 pm
by lmiltchev
Did you delete the localhost and its services? Do you have any services at all? Run the Write Config Tool once again and show the output (CCM->Write Config Files).
I then created a test service, but still get the same no service error:

http://technet.microsoft.com/en-us/libr ... 81005.aspx

Configuration Manager 2007 clients cannot be assigned to secondary sites; they are always assigned to the parent primary site. However, if they reside in the boundaries of the secondary site, they can take advantage of any proxy management points and distribution points at the secondary site.
Can you elaborate? I am not sure I understand how this is relevant...

Re: nagiosxi stuck at applying configuration

Posted: Thu Jan 09, 2014 3:03 pm
by nanz28v
Hi lmiltchev,

sorry I posted the wrong message on that technet link. It basically has the same error message as the first paste.

update: I now after applied abrist's solution as below and now there's no errors in verify config anymore. But still I hang at "Waiting for configuration verification".

I did delete the localhost and its services, and right now I only have a test service. Here is the verify error log:

Error: There are no services defined!

Nagios Core 3.5.0
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-15-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/hostgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/servicegroups.cfg'...
Processing object config file '/usr/local/nagios/etc/hosttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicetemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicedependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostdependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/hostescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostextinfo.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceextinfo.cfg'...
Processing object config directory '/usr/local/nagios/etc/hosts'...
Processing object config file '/usr/local/nagios/etc/hosts/al1cmsch01.cfg'...
Processing object config directory '/usr/local/nagios/etc/services'...
Processing object config file '/usr/local/nagios/etc/services/test.cfg'...
Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Error: There are no services defined!
Checked 0 services.
Checking hosts...
Warning: Host 'al1cmsch01' has no default contacts or contactgroups defined!
Checked 1 hosts.
Checking host groups...
Checked 9 host groups.
Checking service groups...
Checked 3 service groups.
Checking contacts...
Checked 3 contacts.
Checking contact groups...
Checked 2 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 109 commands.
Checking time periods...
Checked 12 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 1
Total Errors: 1

***> One or more problems was encountered while running the pre-flight check...

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.



Hi abrist,

I did remove localhost service/host. I created a new service check named test and applied it to al1cmsch01 host, and NO ERRORS NOW:


Nagios Core 3.5.0
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-15-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/hostgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/servicegroups.cfg'...
Processing object config file '/usr/local/nagios/etc/hosttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicetemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicedependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostdependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/hostescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostextinfo.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceextinfo.cfg'...
Processing object config directory '/usr/local/nagios/etc/hosts'...
Processing object config file '/usr/local/nagios/etc/hosts/al1cmsch01.cfg'...
Processing object config directory '/usr/local/nagios/etc/services'...
Processing object config file '/usr/local/nagios/etc/services/test.cfg'...
Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Warning: Service 'test' on host 'al1cmsch01' has no default contacts or contactgroups defined!
Checked 1 services.
Checking hosts...
Warning: Host 'al1cmsch01' has no default contacts or contactgroups defined!
Checked 1 hosts.
Checking host groups...
Checked 9 host groups.
Checking service groups...
Checked 3 service groups.
Checking contacts...
Checked 3 contacts.
Checking contact groups...
Checked 2 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 109 commands.
Checking time periods...
Checked 12 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 2
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

Re: nagiosxi stuck at applying configuration

Posted: Thu Jan 09, 2014 3:21 pm
by abrist
nanz28v wrote:Things look okay - No serious problems were detected during the pre-flight check
Now try applying configuration once again.

Re: nagiosxi stuck at applying configuration

Posted: Thu Jan 09, 2014 3:53 pm
by nanz28v
Arhhh, it still hangs at the applying config screen after giving it 15 minutes at least (since I'm working on something concurrent at the time).

Re: nagiosxi stuck at applying configuration

Posted: Thu Jan 09, 2014 3:58 pm
by slansing
Is it successfully applying though? What are you working on along side the apply configuration?

Re: nagiosxi stuck at applying configuration

Posted: Thu Jan 09, 2014 4:03 pm
by nanz28v
Yes I can write to config file then verify it without issue at all. However if I add a test service then apply the config it still hangs there. I did nothing the whole time while the config application is running. Attached please find the screenshot for the hung screen.