when running service nagios restart

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
vyas
Posts: 2
Joined: Wed Nov 23, 2016 1:29 pm

when running service nagios restart

Post by vyas »

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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: when running service nagios restart

Post by rkennedy »

It appears you have two host definitions for 'dclnxspl007a' - I would run a grep -R 'dclnxspl007a' /usr/local/nagios/etc/ and see if that points to where the other place it's defined.
Former Nagios Employee
vyasdevaguddi
Posts: 21
Joined: Fri Jan 27, 2017 11:30 am

Re: when running service nagios restart

Post by vyasdevaguddi »

i have attached the nagios screenshot and i getting 255 bounds and as shown in error message
Attachments
Capture.PNG
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: when running service nagios restart

Post by rkennedy »

vyasdevaguddi wrote:i have attached the nagios screenshot and i getting 255 bounds and as shown in error message
Please create your own thread for this problem with more information on the service definitions.
Former Nagios Employee
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: when running service nagios restart

Post by tmcdonald »

Just checking in since we have not heard from you in a while. Did @rkennedy's post clear things up or has the issue otherwise been resolved?
Former Nagios employee
Locked