Nagios Startup Errors

Babak Pasdar bpasdar at IGXGlobal.com
Fri Feb 14 06:11:01 CET 2003


OK,  there has to be something wrong beyond configuration and the obvious.  I tried your config with exactly the same results. In fact the reason you got the config below was because I used nagat, I thought I was perhaps misformatting the config.  I just want to get a basic config up and running.

I have gotten netsaint up and running in the past and it was not this hard.

Thanks

Babak


here is all my configs:

hosts.cfg

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               fw
        alias                   Firewall
        address                 192.168.1.1
        check_command           check-host-alive
        max_check_attempts      10
        notification_interval   120
        notification_period     24x7
        notification_options    d,u,r
        }



hostgroups.cfg

define hostgroup{
        hostgroup_name          hostgroup
        alias                   hostgroup
        contact_groups          contactgroups
        members                 fw
        }



services.cfg

define service{
        host_name               fw
        check_command           check-host-alive
        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          contactgroups
        }



contacts.cfg

define contact{
        contact_name                    jdoe
        alias                           John Doe
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands   notify-by-email
        host_notification_commands      host-notify-by-email
        email                           jdoe at localhost.localdomain
        pager                           555-5555 at pagergateway.localhost.localdomain
        }

contactgroups.cfg

define contactgroup {
contactgroup_name              contactgroups
alias                          contactgroups
register                       1
members                        oktay
}


nagios.cfg

log_file=/usr/local/nagios/var/nagios.log
cfg_file=/usr/local/nagios/etc/hosts.cfg
cfg_file=/usr/local/nagios/etc/misccommands.cfg
cfg_file=/usr/local/nagios/etc/contactgroups.cfg
cfg_file=/usr/local/nagios/etc/contacts.cfg
cfg_file=/usr/local/nagios/etc/dependencies.cfg
cfg_file=/usr/local/nagios/etc/escalations.cfg
cfg_file=/usr/local/nagios/etc/hostgroups.cfg
cfg_file=/usr/local/nagios/etc/hosts.cfg
cfg_file=/usr/local/nagios/etc/services.cfg
cfg_file=/usr/local/nagios/etc/timeperiods.cfg
resource_file=/usr/local/nagios/etc/resource.cfg
temp_file=/usr/local/nagios/var/nagios.tmp
status_file=/usr/local/nagios/var/status.log
aggregate_status_updates=1
status_update_interval=15
nagios_user=nagios
nagios_group=nagios
enable_notifications=1
execute_service_checks=1
accept_passive_service_checks=1
enable_event_handlers=1
log_rotation_method=d
log_archive_path=/usr/local/nagios/var/archives
check_external_commands=0
command_check_interval=-1
comment_file=/usr/local/nagios/var/comment.log
downtime_file=/usr/local/nagios/var/downtime.log
command_file=/usr/local/nagios/etc/nagios.cmd
lock_file=/usr/local/nagios/var/nagios.lock
retain_state_information=1
state_retention_file=/usr/local/nagios/var/status.sav
retention_update_interval=60
use_retained_program_state=0
use_syslog=1
log_notifications=1
log_service_retries=1
log_host_retries=1
log_event_handlers=1
log_initial_states=0
log_external_commands=1
log_passive_service_checks=1
sleep_time=1
max_concurrent_checks=0
service_reaper_frequency=10
interval_length=60
use_agressive_host_checking=1
enable_flap_detection=0
low_service_flap_threshold=5.0
high_service_flap_threshold=20.0
low_host_flap_threshold=5.0
high_host_flap_threshold=20.0
soft_state_dependencies=0
service_check_timeout=60
host_check_timeout=30
event_handler_timeout=30
notification_timeout=30
ocsp_timeout=5
perfdata_timeout=5
obsess_over_services=0
process_performance_data=0
check_for_orphaned_services=0
check_service_freshness=1
freshness_check_interval=60
admin_email=nagios
admin_pager=pagenagios
date_format=us


cgi.cfg

xdddb_host=127.0.0.1
xdddb_port=3306
xdddb_username=nagios
xdddb_password=nagios
xdddb_database=nagios

xcddb_host=127.0.0.1
xcddb_port=3306
xcddb_username=nagios
xcddb_password=nagios
xcddb_database=nagios

xsddb_host=127.0.0.1
xsddb_port=3306
xsddb_username=nagios
xsddb_password=nagios
xsddb_database=nagios

xeddb_host=127.0.0.1
xeddb_port=3306
xeddb_username=nagios
xeddb_password=nagios
xeddb_database=nagios

main_config_file=/usr/local/nagios/etc/nagios.cfg
physical_html_path=/usr/local/nagios/share
url_html_path=/nagios/
show_context_help=0
use_authentication=1
default_statusmap_layout=5
default_statuswrl_layout=4
ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
refresh_rate=90


resources.cfg
 
$USER1$=/usr/local/nagios/libexec

xsddb_host=127.0.0.1
xsddb_port=3306
xsddb_database=nagios
xsddb_username=nagios
xsddb_password=nagios
xsddb_optimize_data=1
xsddb_optimize_interval=3600

xcddb_host=127.0.0.1
xcddb_port=3306
xcddb_database=nagios
xcddb_username=nagios
xcddb_password=nagios
xcddb_optimize_data=1

xdddb_host=127.0.0.1
xdddb_port=3306
xdddb_database=nagios
xdddb_username=nagios
xdddb_password=nagios
xdddb_optimize_data=1

xrddb_host=127.0.0.1
xrddb_port=3306
xrddb_database=nagios
xrddb_username=nagios
xrddb_password=nagios
xrddb_optimize_data=1





Carroll, Jim P [Contractor] wrote:
> 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 
> > 
> 

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