when running service nagios restart
Posted: Thu Feb 09, 2017 11:10 pm
when running service nagios restart on nagios server
i have newly added this server in the nagios server and iam facing this issue please help me when i am making mistake
[root@nblnxora003d objects]# service nagios restart
Running configuration check...
Nagios Core 4.1.0rc2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributo rs
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 07-17-2015
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for host 'dclnxspl007a' (config file '/usr/local/nagios/etc/objects/hostname.cfg', starting on line 24)
Error: Could not add object property in file '/usr/local/nagios/etc/objects/hostname.cfg' on line 28.
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 defintions. 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.
24 define host{
25 use linux-server ; Name of host template to use
26 ; This host definition will inherit all variables that are defined
27 ; in (or inherited by) the linux-server host template definition.
28 host_name hostname
29 alias hostname
30 address 10.XX.XX.XXX
31 }
32
i have newly added this server in the nagios server and iam facing this issue please help me when i am making mistake
[root@nblnxora003d objects]# service nagios restart
Running configuration check...
Nagios Core 4.1.0rc2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributo rs
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 07-17-2015
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for host 'dclnxspl007a' (config file '/usr/local/nagios/etc/objects/hostname.cfg', starting on line 24)
Error: Could not add object property in file '/usr/local/nagios/etc/objects/hostname.cfg' on line 28.
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 defintions. 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.
24 define host{
25 use linux-server ; Name of host template to use
26 ; This host definition will inherit all variables that are defined
27 ; in (or inherited by) the linux-server host template definition.
28 host_name hostname
29 alias hostname
30 address 10.XX.XX.XXX
31 }
32