Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 May 2008 20:59:54 +0930
From:      Jarrod Sayers <jarrod@netleader.com.au>
To:        Randy Bush <randy@psg.com>
Cc:        freebsd ports <freebsd-ports@freebsd.org>
Subject:   Re: nagios: Error: Host 'foo' has already been defined
Message-ID:  <D1997E90-3C63-47F3-B81E-67F48E9E80F8@netleader.com.au>
In-Reply-To: <4828289D.4000205@psg.com>
References:  <48282418.1090301@psg.com> <F8BFEFF7-2E7C-4EB1-BD92-87D6709C0745@netleader.com.au> <4828289D.4000205@psg.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/05/2008, at 8:53 PM, Randy Bush wrote:
>> Did this include an upgrade of Nagios or has the upgrade of a  
>> dependent
>> resulted in this?
>
> not sure

Nagios 2.11 was committed about six weeks ago for memory, though  
reading further I think it was actually the trigger.

>> Starting on line 1, hmm...  Sounds like the files are being read  
>> twice,
>> what does nagios.cfg have to say for itself?
>
> # grep cfg nagios.cfg | grep -v ^#
> cfg_file=/usr/local/etc/nagios/commands.cfg
> cfg_file=/usr/local/etc/nagios/localhost.cfg
> cfg_file=/usr/local/etc/nagios/contactgroups.cfg
> cfg_file=/usr/local/etc/nagios/contacts.cfg
> cfg_file=/usr/local/etc/nagios/hostgroups.cfg
> cfg_file=/usr/local/etc/nagios/routergroups.cfg
> cfg_dir=/usr/local/etc/nagios/commands
> cfg_dir=/usr/local/etc/nagios/servers
> cfg_dir=/usr/local/etc/nagios/servers/randy
> cfg_dir=/usr/local/etc/nagios/servers/smb
> ...

Remove the two lines above, the ones ending in servers/randy and  
servers/smb and see how you go.  According to the documentation [1],  
the directories listed with cfg_dir arguments are recursively searched  
for *.cfg files.

[1] http://nagios.sourceforge.net/docs/2_0/configmain.html#cfg_dir

Jarrod.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D1997E90-3C63-47F3-B81E-67F48E9E80F8>