nagios: Error: Host 'foo' has already been defined
Jarrod Sayers
jarrod at netleader.com.au
Mon May 12 11:29:57 UTC 2008
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.
More information about the freebsd-ports
mailing list