Page 1 of 2

Config Error

Posted: Mon Feb 22, 2016 7:23 am
by operations_asavie
Hi,

Can you help me please, am running into a Config Error when applying configuration changes.

Even when I revert back to a previous snapshot that has "Config Ok" in the Snapshot Result and the following output when I view the config.I still get the error below. Can you please help with this?

**************
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...
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 409 services.
Checked 13 hosts.
Checked 4 host groups.
Checked 1 service groups.
Checked 2 contacts.
Checked 2 contact groups.
Checked 126 commands.
Checked 8 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 13 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 8 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

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

Error: Invalid max_check_attempts value for host 'XXXX'

Error: Could not register host (config file '/usr/local/nagios/etc/hosts/XXXX', starting on line 16)

Re: Config Error

Posted: Mon Feb 22, 2016 7:43 am
by operations_asavie
See the downloaded snapshot attached.

Re: Config Error

Posted: Mon Feb 22, 2016 10:32 am
by rkennedy

Code: Select all


Error: Invalid max_check_attempts value for host 'XXXX'

Error: Could not register host (config file '/usr/local/nagios/etc/hosts/XXXX', starting on line 16)
In order to take a look at what's going on here, we'll need to know what host XXXX is.

Re: Config Error

Posted: Mon Feb 22, 2016 10:38 am
by bwallace
rkennedy is correct, but you could quickly check to confirm the settings are at least correct for "'max_check_attempts' on the host in question.

Go to :
Core Config Manager > Hosts > and Select the host in question so the 'Host management' window appears. Click the 'Check Settings' tab and make sure Check / Retry intervals have values as well as 'Max check attempts.' Anything with with a red asterisk next to it cannot be left blank either. Also fill out the notification period under the 'Alert Settings' tab.
Save changes and apply config - this should do away with those errors, but new errors may be revealed instead. If issue persists, please provide more detail about the the host you're attempting to monitor (is it Linux or Windows machine, router or switch, is an agent such as NRPE installed on it, etc) as rkennedy mentioned.

Re: Config Error

Posted: Mon Feb 22, 2016 12:04 pm
by operations_asavie
Hi,

Host is C8T14Y1.mgmt, have configured the check settings (see image attached) similar to all other hosts that are not causing any errors.

The host is a Dell server.

Anything else you need, please let me know as I need to get this resolved ASAP.

Re: Config Error

Posted: Mon Feb 22, 2016 3:08 pm
by lmiltchev
Did you try applying configuration after modifying this host under the CCM, and saving the changes? Do you see any config errors when you run the Write Config tool?

CCM->Tools->Write Config Files->Write->Verify

Can you show us the configs of the "C8T14Y1.mgmt" host, and the "linux-server" template?

Re: Config Error

Posted: Tue Feb 23, 2016 3:56 am
by operations_asavie
When using the Write Config files tool CCM I am seeing all config files verified and then successfully written.

However, when I've gone to use the standard "Apply Configuration" the error below still persists. I've even gone so far as deleting all services pertaining to that particular host and then deleting the host but even then when I try to apply the configuration......I still get the same error, even though the host C8T14Y1.mgmt.cfg has been deleted.

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

Re: Config Error

Posted: Tue Feb 23, 2016 12:59 pm
by hsmith
How are you deleting the services? You're making sure to do it in CCM instead of from the command line, correct?

Re: Config Error

Posted: Wed Feb 24, 2016 6:24 am
by operations_asavie
Yes, that's correct. I CCM, selecting "Services" in Monitoring then deleting all services. Then selecting "Hosts" in Monitoring and deleting all the hosts. When I do this, the Apply Configuration fails due the error I've outlined.

Re: Config Error

Posted: Wed Feb 24, 2016 6:52 am
by operations_asavie
I need a resolution to this ASAP. It's been two days since I've raised this issue with you.

Right now, I have only one service in operation on one host but despite this and the C8T14Y1.mgmt host being deleted. It's still presents an Error when Applying a Configuration.

Can you please get back to me on this right away?