Failed to start LSB:

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.
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: Failed to start LSB:

Post by DOkuwa »

I made adjustment to the Nagios.cfg file and error message again

I am also uploading the nagios.cfg file and hosts.cfg (line 88 & 89 are highlighted in red )
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.3.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2017-08-24
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for host 'generic-host' (config file '/usr/local/nagios/etc/hosts.cfg', starting on line 88)
Error: Could not add object property in file '/usr/local/nagios/etc/hosts.cfg' on line 89.
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 definitions. 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
Attachments
host.cfg-updated.docx
(19.69 KiB) Downloaded 220 times
nagios.cfg
nagios.cfg file
(43.77 KiB) Downloaded 495 times
kyang

Re: Failed to start LSB:

Post by kyang »

Could you post this exact cfg file instead of a docx?
And comment out(take out) the cfg_dir in your nagios.cfg that you added in since you added in the cfg_file already.

Code: Select all

cat /usr/local/nagios/etc/hosts.cfg
Instead of using name could you switch it to host_name? Here's an example.

Code: Select all

define host{
        use                     linux-server            ; Name of host template to use
        host_name               xi
        alias                   xi
        address                 192.168.4.125
        }
# Define a host for the local machine

define host{
        use                     linux-server            ; Name of host template to use
        host_name               nna
        alias                   nna
        address                 192.168.4.45
        }
When I use "name" it doesn't show up as a host in my Core.
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: Failed to start LSB:

Post by DOkuwa »

Thanks
it is now working I just removed the entries for generic_hosts in the hosts.cfg
kyang

Re: Failed to start LSB:

Post by kyang »

Sounds great! Can I close this topic as resolved?
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: Failed to start LSB:

Post by DOkuwa »

yes
kyang

Re: Failed to start LSB:

Post by kyang »

Closing this topic.

If you have any more questions, feel free to create another thread!

Thank you for using the Nagios Support Forum!
Locked