Devices with more than one address

peter riegersperger rick at subnet.at
Fri Nov 29 12:10:09 CET 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jesse Reynolds wrote:
| Thanks Rick, that's pretty neat.
|
| But what about checking the different services on the different
| interfaces? eg my example with two different web servers on the one
| host, each on port 80 but on different interfaces. I suppose you would
| need to hack the check_http command in a similar fasion eh?

exactly.

define in checkcommands.cfg:
define command{
~        command_name    check_http_vhost_ip
~        command_line    $USER1$/check_http -I $ARG1$
~        }


and add a service to your host:
define service{
~        host_name             [HOST]
~        service_description   HTTP home.subnet.at
~        check_command         check_http_vhost_ip![IP OF YOUR
NON-PRIMARY INTERFACE]
~        }

if you do name-based hosting (HTTP/1.1) you can use:
define command{
~        command_name    check_http_vhost_name
~        command_line    $USER1$/check_http -H $ARG1$
~        }

and pass it the name of the virtual domain.

check_http is quite powerful.
do a ./check_http -h in your nagios/libexec to get a list of parameters
it is accepting.
you can pass any parameter you want to it (with the $ARG1$, $ARG2$, ...
expression).

just define new checkcommands as you need them.

greetings,

rick


- --
|-
| peter riegersperger  <rick at subnet.at>
|-
| ein windows switcher tagebuch:
| http://forum.subnet.at/viewforum.php?f=22
|-
| subnet
| platform for media art and experimental technologies
|-
| http://www.subnet.at/
|-
| muehlbacherhofweg 5 // 5020 salzburg // austria
|-
| fon/fax +43/662/842 897
|-
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE950sRIMP39JYOy9IRAgmlAJ9OQ154iV/fUpm34w44VJ4YCzAm9gCg9Ji/
gS+D7skkLhOHWjDS3K5dGYk=
=O1Zx
-----END PGP SIGNATURE-----



-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en




More information about the Users mailing list