http service checks
Steve Loughran
stevelml1 at scee.sony.co.uk
Wed Aug 21 19:12:05 CEST 2002
Checking http on virtual hosts (i.e. multiple `sites` but on the same IP and
port) is easy to do, and a lot less long winded than the way you are doing
it.
You set up a single hostname, but call a seperate check_vhttp command, which
you can pass the virtual hostname to... so all the checks connect to the
same ip, but check the virtual hosts
(watch the line wrap on some of these entries)
=====================
hosts.cfg:
define host{
use generic-host ; Name of host
template to use
host_name webhost
alias webhost - with multiple virtual web sites on
it
address 1.2.3.4
check_command check-host-alive
max_check_attempts 3
notification_interval 60
notification_period 24x7
notification_options d,u,r
}
=====================
checkcommands.cfg:
# 'check_vhttp' command definition
define command{
command_name check_vhttp
command_line $USER1$/check_http -I $HOSTADDRESS$ -H $ARG1$
}
=====================
services.cfg:
#webhost- vhttp
define service{
use generic-service ; Name of service template to
use
host_name webhost
service_description VHTTP-vhost1
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admins
notification_interval 60
notification_period 24x7
notification_options c,r
check_command check_vhttp!vhost1.whatever.com
}
#vhost1- vhttp
define service{
use generic-service ; Name of service template to
use
host_name webhost
service_description VHTTP-vhost2
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups admins
notification_interval 60
notification_period 24x7
notification_options c,r
check_command check_vhttp!vhost2.whatever.com
}
<etc>
=====================
Steve
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
More information about the Users
mailing list