Failed to start Nagios Core 4.4.5.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
vho
Posts: 11
Joined: Thu Nov 14, 2019 4:13 pm

Failed to start Nagios Core 4.4.5.

Post 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

Attachments
services.cfg
(36.09 KiB) Downloaded 316 times
nagios.cfg
(44.32 KiB) Downloaded 302 times
hosts.cfg
(18.63 KiB) Downloaded 250 times
vho
Posts: 11
Joined: Thu Nov 14, 2019 4:13 pm

Re: Failed to start Nagios Core 4.4.5.

Post by vho »

Attaching the commands.cfg and templates.cfg files as well.
Attachments
templates.cfg
(12.24 KiB) Downloaded 301 times
commands.cfg
(14.32 KiB) Downloaded 253 times
vho
Posts: 11
Joined: Thu Nov 14, 2019 4:13 pm

Re: Failed to start Nagios Core 4.4.5.

Post by vho »

Thread can be closed. I was able to resolve the issue by correcting the config files.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Failed to start Nagios Core 4.4.5.

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Failed to start Nagios Core 4.4.5.

Post by ssax »

Sounds good, closing now.
Locked