Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 May 2008 13:03:52 +0200
From:      Randy Bush <randy@psg.com>
To:        freebsd ports <freebsd-ports@freebsd.org>
Cc:        Jarrod Sayers <jarrod@netleader.com.au>
Subject:   nagios: Error: Host 'foo' has already been defined
Message-ID:  <48282418.1090301@psg.com>

next in thread | raw e-mail | index | archive | help
i386, very current
nagios 2.11

after portupgrade, a nagios which used to work fine now does

---

# /usr/local/etc/rc.d/nagios start
Performing sanity check of nagios configuration: FAILED

Nagios 2.11
Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org)
Last Modified: 03-12-2008
License: GPL

Reading configuration data...

Error: Host 'bbgp' has already been defined
Error: Could not register host (config file
'/usr/local/etc/nagios/servers/randy/bbgp.psg.com.cfg', starting on line 1)

***> 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.

---

this happens for the host in question.  if i remove that host from the
configuration, it complains about a different host.

i have looked long and hard, and the host is only defined once

:/usr/local/etc/nagios# find . -name \*cfg | xargs grep bbgp
./hostgroups.cfg:       members         adlrv,bbgp,ron,ver0
./servers/randy/bbgp.psg.com.cfg:       host_name               bbgp
./servers/randy/bbgp.psg.com.cfg:       alias                   bbgp.psg.com
./servers/randy/bbgp.psg.com.cfg:       host_name                bbgp

:/usr/local/etc/nagios# cat servers/randy/bbgp.psg.com.cfg
define host{
       host_name                bbgp
       alias                    bbgp.psg.com
       address                  147.28.0.60
       parents                  psg2
       check_command            check-host-alive
       max_check_attempts       5
       check_interval           1
       active_checks_enabled    0
       check_period             24x7
       check_interval           1
       contact_groups           server-admins
       notification_interval    30
       notification_period      24x7
       notification_options     d,u,r
       }

define service{
       host_name                bbgp
       service_description      ssh
       check_command            ck_ssh
       max_check_attempts       5
       normal_check_interval    5
       retry_check_interval     3
       check_period             24x7
       notification_interval    30
       notification_period      24x7
       notification_options     w,c,r
       contact_groups           server-admins
       }

clue bat, please.

randy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48282418.1090301>