Devices with more than one address

Jesse Reynolds lizst at va.com.au
Thu Nov 28 22:38:33 CET 2002


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?

Cheers

Jesse


At 14:21 +0100 28/11/2002, peter riegersperger wrote:
>Jesse Reynolds wrote:
>| Subhendu, I don't think this would work, because you can't specify an IP
>| address  for a service. So if you have multiple IP numbers on the one
>| host I think you have to set it up as multiple hosts if you want Nagios
>| to monitor each IP address.
>
>yes, you can. that's exactly what i'm doing:
>
>first, define a host:
>define host{
>~        alias                           Router Local
>~        address                         193.170.141.253
>~        check_command                   check-host-alive
>~        }
>
>with your primary interface as address.
>
>then, define the following in checkcommands.cfg :
>define command{
>~        command_name    check_interface
>~        command_line    $USER1$/check_ping -H $ARG1$ -w $ARG2$ -c $ARG3$
>- -p 5
>}
>
>and then, define all other interfaces as services:
>
>define service{
>~        host_name                               router-local
>~        service_description             interface .222 [arge]
>~        check_command
>check_interface!193.170.141.222!100.0,20%!500.0,60%
>~        }
>
>note that by "wrapping" ping into its own command, i'm able to send the
>ip-number of the interface to check along.
>
>do this for all your interfaces.
>
>greetings,
>
>rick

-- 
       Jesse Reynolds - Virtual Artists Pty Ltd - http://www.va.com.au

     Email: jesse (at) va.com.au            > Website Development
     Phone: +61 (0)8 8223 2288              > Web & Email Hosting
       Web: http://jesse.va.com.au          > Streaming Media Hosting
                                            > Telehousing / Colocation


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