Page 1 of 1

Failed to start Nagios Core 4.4.5.

Posted: Tue Nov 26, 2019 3:27 pm
by vho
Running Nagios Core 4.4.5 on CentOS 7

Unable to start Nagios service.

Code: Select all

v 26 14:22:45 DALSRVITMON01.oz.local nagios[3148]: Error: Could not add object property in file '/usr/local/nagios/etc/OZ/templates.cfg' on line 69.
Nov 26 14:22:45 DALSRVITMON01.oz.local nagios[3148]: Error: Invalid max_check_attempts value for host 'AWSSRVPRDIIS01'
Nov 26 14:22:45 DALSRVITMON01.oz.local nagios[3148]: Error: Could not register host (config file '/usr/local/nagios/etc/OZ/hosts.cfg', starting on line 710)
Nov 26 14:22:45 DALSRVITMON01.oz.local nagios[3148]: Error processing object config files!
Nov 26 14:22:45 DALSRVITMON01.oz.local nagios[3148]: ***> One or more problems was encountered while processing the config files...
Nov 26 14:22:45 DALSRVITMON01.oz.local nagios[3148]: Check your configuration file(s) to ensure that they contain valid
Nov 26 14:22:45 DALSRVITMON01.oz.local nagios[3148]: directives and data definitions.  If you are upgrading from a previous
Nov 26 14:22:45 DALSRVITMON01.oz.local nagios[3148]: version of Nagios, you should be aware that some variables/definitions
Nov 26 14:22:45 DALSRVITMON01.oz.local nagios[3148]: may have been removed or modified in this version.  Make sure to read
Nov 26 14:22:45 DALSRVITMON01.oz.local nagios[3148]: the HTML documentation regarding the config files, as well as the
Nov 26 14:22:45 DALSRVITMON01.oz.local nagios[3148]: 'Whats New' section to find out what has changed.
Nov 26 14:22:45 DALSRVITMON01.oz.local systemd[1]: Failed to start Nagios Core 4.4.5.
-- Subject: Unit nagios.service has failed
-- Defined-By: systemd


Re: Failed to start Nagios Core 4.4.5.

Posted: Tue Nov 26, 2019 3:29 pm
by vho
Attaching the commands.cfg and templates.cfg files as well.

Re: Failed to start Nagios Core 4.4.5.

Posted: Tue Nov 26, 2019 5:27 pm
by vho
Thread can be closed. I was able to resolve the issue by correcting the config files.

Re: Failed to start Nagios Core 4.4.5.

Posted: Tue Nov 26, 2019 5:35 pm
by ssax
Please remove your duplicate host and service templates entries from your hosts.cfg file (some are already in your templates.cfg):

register 0 = template

Here's an easy way to find them for you:

Code: Select all

grep -B15 'register 0' /usr/local/nagios/etc/OZ/hosts.cfg
Just make sure they are in the templates.cfg before removing from the hosts.cfg.

Re: Failed to start Nagios Core 4.4.5.

Posted: Tue Nov 26, 2019 5:35 pm
by ssax
Sounds good, closing now.