http service checks

Max Clark max at clarksys.com
Wed Aug 21 20:22:49 CEST 2002


Thanks everyone for the help!

-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Steve
Loughran
Sent: Wednesday, August 21, 2002 10:12 AM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] http service checks

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
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users



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