host name problem
Brian Smith
brian.smith at worldpub.net
Tue Sep 12 19:35:34 CEST 2006
Hello all, does anyone know why the following problem occurs:
I have some hosts having duplicate name issues when adding the
serviceextinfo information for those hosts.
Host 1 is called earth, host 2 is called earthquake.
Here's the hosts.cfg definition:
-----------------------------------------------------------------------------
define host{
name generic-host
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 0
register 0
}
define host{
use generic-host ; Name of host
template to use
host_name earth
alias earth
address 127.0.0.1
check_command check-host-alive
max_check_attempts 10
notification_interval 120
notification_period 24x7
notification_options d,r
contact_groups admins
}
define host{
use generic-host ; Name of host
template to use
host_name earthquake
alias earthquake
address 127.0.0.1
check_command check-host-alive
max_check_attempts 10
notification_interval 120
notification_period 24x7
notification_options d,r
contact_groups admins
}
----------------------------------------------------------------------------------------------------------------------
And here is the services.cfg
------------------------------------------------------------------------------------------------------------
define service{
name generic-service
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 0
register 0
}
define service{
use generic-service ; Name
of service template to use
host_name earth,earthquake
service_description PING
is_volatile 0
check_period 24x7
max_check_attempts 2
normal_check_interval 5
retry_check_interval 1
contact_groups admins
notification_options w,u,c,r
notification_interval 60
notification_period 24x7
check_command check_ping!100.0,20%!500.0,60%
}
--------------------------------------------------------------------------------------------------------------------------
Everything works great now, until i add some serviceextinfo:
serviceextinfo.cfg:
-----------------------------------------------------------------------------------------------------------
define serviceextinfo{
host_name earthquake
icon_image dot.png' border="0"></a><A
TARGET="_blank" HREF="graphs.cgi?host=earthquake&service=PING"><img
src='/nagios/cgi-bin/rrd2-system.cgi?host=earthquake&service=PING&start=-5400&title=Actual&width=20&height=20&type=AVERAGE&only-graph=true'
service_description PING
notes_url https://wiki/$HOSTNAME$-$SERVICEDESC$
}
define serviceextinfo{
host_name earth
icon_image dot.png' border="0"></a><A
TARGET="_blank" HREF="graphs.cgi?host=earth&service=PING"><img
src='/nagios/cgi-bin/rrd2-system.cgi?host=earth&service=PING&start=-5400&title=Actual&width=20&height=20&type=AVERAGE&only-graph=true'
service_description PING
notes_url https://wiki/$HOSTNAME$-$SERVICEDESC$
}
-------------------------------------------------------------------------------------------------------------------------------------------------
Ok, now when I run ../bin/nagios -v ./nagios.cfg I get the error:
root at nagios:/opt/nagios/etc# ../bin/nagios -v ./nagios.cfg
Nagios 2.5
Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org)
Last Modified: 07-13-2006
License: GPL
Reading configuration data...
Error: Could not add duplicate serviceextinfo entry for service 'PING'
on host 'earthquake'.
Error: Could not allocate memory for serviceextinfo list to add extended
info for service 'PING' on host 'earthquake'.
Error: Could not register extended service information (config file
'/opt/nagios/etc/checkcommands.cfg', starting on line 135111232)
Any suggestions on getting the serviceextinfo.cfg entries working for
these 2 hosts? It works if I only have one of the hosts in the cfg file?
Thanks!
Brian Smith
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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