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
Failed to start LSB:
Re: Failed to start LSB:
- Attachments
-
- host.cfg-updated.docx
- (19.69 KiB) Downloaded 232 times
-
- nagios.cfg
- nagios.cfg file
- (43.77 KiB) Downloaded 511 times
Re: Failed to start LSB:
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.
Instead of using name could you switch it to host_name? Here's an example.
When I use "name" it doesn't show up as a host in my Core.
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
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
}
Re: Failed to start LSB:
Thanks
it is now working I just removed the entries for generic_hosts in the hosts.cfg
it is now working I just removed the entries for generic_hosts in the hosts.cfg
Re: Failed to start LSB:
Closing this topic.
If you have any more questions, feel free to create another thread!
Thank you for using the Nagios Support Forum!
If you have any more questions, feel free to create another thread!
Thank you for using the Nagios Support Forum!