Single host with multiple IP's

Subhendu Ghosh sghosh at sghosh.org
Fri Feb 13 19:20:47 CET 2004


On Thu, 12 Feb 2004, Greg Vickers wrote:

> Michael,
> 
> We have a similar situation and I use two host definitions. There may be 
> some sexier way of doing it - anyone?
> 
> Greg
> 
> At 10:53 AM 12/02/2004, Michael Gale wrote:
> >Hello,
> >
> >         I have some questions concerning hosts with multiple IP's. For 
> > example lets say
> >I have a server at a separate location which is accessible through a VPN and
> >over the web.
> >
> >So I can access this server by it's public IP and private IP address. In the
> >hosts.cfg file do I have to create to host entries with different "host_name"
> >settings ?
> >
> >On the public IP I want to monitor http and on the private PING,SSH,FTP ..
> >
> >Is there a better way then having two completely different hosts definitions ?
> >

the check_ping plugin in v1.4 accepts multiple IP addresses...

Based on the above, you can define multiple IP addresses in the host 
definition. - Nagios doesn't mind.

However, you will need new command definitions for all the other services 
as they do not handle multiple addresses in the HOSTADDRESS macro.

The new definitions need to use the ARGx macros from the service 
definition instead of HOSTADDRESS

The service definitions need to provide the target address as arguments to 
the command.

-- 

-sg



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
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