Nagios Startup Errors

Carroll, Jim P [Contractor] jcarro10 at sprintspectrum.com
Fri Feb 14 01:32:09 CET 2003


I think your config is suffering from recursion.

On the one hand, you've given freelinuxcd.org the name of generic-host, and
2 lines later, you're telling Nagios to refer to the generic-host definition
for the details.

Not related to this issue, your check_command is incorrect.  You're
specifying the command here, when you should be referencing a token in
checkcommands.cfg.

If I may...?  Try this instead:

define host{
        name                            generic-host
        notifications_enabled           1
        event_handler_enabled           1
        flap_detection_enabled          1
        process_perf_data               1
        retain_status_information       1
        retain_nonstatus_information    1
        register                        0
        }

define host{
        use                     generic-host
        host_name               freelinuxcd.org
        alias                   Free Linux CD Project Server
        address                 131.161.247.80
        check_command           check-host-alive
        max_check_attempts      10
        notification_interval   120
        notification_period     24x7
        notification_options    d,u,r
        }

Some notes:

1) You've got low_flap_threshold and high_flap_threshold set... I don't
believe these directives exist in any host/service definition (but I'm sure
someone will correct me if I'm wrong)... however, there are names similar to
these in nagios.cfg, which is where they belong.

2) The address *must* be the IP address, if you're to use it at all.
Extrapolating from your example, I would guess that you're relying on DNS to
do the hostname resolution.  In that case, remove the 'address' line
altogether.  (It also frees you up in case someone renumbers that hostname.
But there are other issues to concern yourself with if you go that route...
for now, just try the above trivial case just to get it working.  You can
fine tune later.)

Anyway, try the above on for size.  If it works, great.  If you're surprised
that it works, go back and read over the documentation to find out why.

HTH.

jc

> -----Original Message-----
> From: Babak Pasdar [mailto:bpasdar at IGXGlobal.com]
> Sent: Thursday, February 13, 2003 6:02 PM
> To: Carroll, Jim P [Contractor]
> Cc: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] Nagios Startup Errors
> 
> 
> 
> Jim,
> 
> Thank you for yor response.  All I can say is that I have as 
> simple of a config as one could have.  I just implemented teh 
> bare minimum to get Nagios going in each of the appropriate files.
> 
> 
> This is the entire content of my hosts.cfg
> 
> define host {
> host_name                      freelinuxcd.org
> alias                          Free Linux CD Project Server
> address                        www.freelinuxcd.org
> name                           generic-host
> register                       1
> use                            generic-host
> max_check_attempts             10
> notification_interval          120
> notification_period            24x7
> notification_options           d,u,r
> notifications_enabled          1
> check_command                  check_ping!-w 200,20% -c 
> 300,30% -p 5 -t 1000
> checks_enabled                 0
> event_handler_enabled          1
> low_flap_threshold             1
> high_flap_threshold            2
> flap_detection_enabled         1
> process_perf_data              1
> retain_status_information      1
> retain_nonstatus_information   1
> }
> 
> Thanks
> 
> Babak
> 
> Carroll, Jim P [Contractor] wrote:
> > Looks like you have 'freelinuxcd.org' defined more than once.
> > 
> > Do a 'grep -c freelinuxcd.org hosts.cfg'.  Tell us what the 
> result of that
> > is.  If it's greater than 1, search hosts.cfg for other occurrences.
> > 
> > If it's *not* in that file, do a 'grep -l freelinuxcd.org *' in your
> > /usr/local/nagios/etc directory.  Make sure you don't have the host
> > definition more than once in *any* file.
> > 
> > jc
> > 
> > > -----Original Message-----
> > > From: Babak Pasdar [mailto:bpasdar at IGXGlobal.com]
> > > Sent: Thursday, February 13, 2003 12:13 PM
> > > To: nagios-users at lists.sourceforge.net
> > > Subject: [Nagios-users] Nagios Startup Errors
> > > 
> > > 
> > > 
> > > Hello,
> > > 
> > > After spending over 8 hours trying find teh source of this 
> > > problem, I am 
> > > giving up and asking?
> > > 
> > > I keep getting the following error on startup.  I have 
> tried manually 
> > > configuring the files as well as using nagat.  What am I 
> > > missing?  I saw 
> > > in the ail archives somebody else had this exact issue, 
> however there 
> > > was no response.  Numerous searches of google for this 
> same issue has 
> > > also been fruitless.
> > > 
> > > Any help would be tremendously appreciated.  
> > > 
> > > Thanks,
> > > 
> > > Babak
> > > 
> > > Nagios 1.0
> > > Copyright (c) 1999-2002 Ethan Galstad (nagios at nagios.org)
> > > Last Modified: 11-24-2002
> > > License: GPL
> > > 
> > > Reading configuration data...
> > > 
> > > Error: Host 'freelinuxcd.org' has already been defined
> > > 
> > > Error: Could not register host (config file 
> > > '/usr/local/nagios/etc/hosts.cfg', line 8)
> > > 
> > > 
> > > ***> One or more problems was encountered while 
> processing the config 
> > > files...
> > > 
> > > 
> > > 
> > > 
> > > -------------------------------------------------------
> > > This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
> > > are you planning your Web Server Security? Click here to 
> get a FREE
> > > Thawte SSL guide and find the answers to all your  SSL 
> > > security issues.
> > > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
> > > _______________________________________________
> > > Nagios-users mailing list
> > > Nagios-users at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/nagios-users
> > > ::: Please include Nagios version, plugin version (-v) and OS 
> > > when reporting any issue. 
> > > ::: Messages without supporting info will risk being sent 
> to /dev/null
> > > 
> > 
> 
> --
> Babak Pasdar
> Founder/CTO
> IGX Global
> 389 Main St.
> Hackensack, NJ 07601
> www.igxglobal.com
> (201) 498-0555 ext. 2205
> 
> The electronic message that you have received and any 
> attachments are solely intended for the use of the 
> addressee(s) and may contain information that is confidential.  
> 
> If you receive this email in error, please advise us by 
> responding to NOC at igxglobal.com. You are required to delete 
> the contents and destroy any copies immediately.  IGX Global 
> is not liable for the views expressed in this electronic 
> message or for the consequences of any computer viruses that 
> may be unknowingly transmitted within this message.
>         
> This electronic message is also subject to standard 
> copyright/ownership laws. It is not intended to be 
> reproduced, or re-transmitted without the consent of the originator.
> 
> www.igxglobal.com 
> 


-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list