Page 2 of 2

Re: Failed to start LSB:

Posted: Wed Oct 11, 2017 6:09 am
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

Re: Failed to start LSB:

Posted: Wed Oct 11, 2017 2:54 pm
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.

Re: Failed to start LSB:

Posted: Thu Oct 12, 2017 10:15 am
by DOkuwa
Thanks
it is now working I just removed the entries for generic_hosts in the hosts.cfg

Re: Failed to start LSB:

Posted: Thu Oct 12, 2017 10:20 am
by kyang
Sounds great! Can I close this topic as resolved?

Re: Failed to start LSB:

Posted: Thu Oct 12, 2017 10:50 am
by DOkuwa
yes

Re: Failed to start LSB:

Posted: Thu Oct 12, 2017 10:54 am
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!