"service IPs" versus "host IPs"

Sean Dilda agrajag at dragaera.net
Mon Nov 1 22:33:08 CET 2004


On Mon, 2004-11-01 at 13:26, Ollie Cook wrote:
> Good afternoon,
> 
> It is procedure at my place of work to distinguish between "host IPs" and
> "service IPs" for the majority of our network services.
> 
> That is to say, host 'foo' may have a management IP 192.168.0.10 (its "host
> IP"), but the HTTP service on that host may listen on IP 192.168.1.20 (its
> "service IP").
> 
> The reason for this is to make it easy to move a service from one host to
> another (by simply moving the IP address to another host).
> 
> I can't find a way of configuring Nagios (1.2) to understand this way of
> distributing services. As far as I can tell, Nagios assumes that all services
> on a host will listen on the same IP address.

There is that assumption, but its easily worked around.  All that
assumption does is cause $HOSTADDRESS$ for the service to match that of
the host, and that's what's commonly used in the checkcommands.cfg  You
can easily rewrite your checkcommands.cfg so that it uses an extra
argument as the IP.

For example:

define command{
        command_name    check_http
        command_line    $USER1$/check_http -H $ARG1$
        }

define service{
	name		check-http
	host_name	foo
	check_command	check_http!192.168.1.20
	....
	}

That will cause there to be a check-http service for host 'foo', that
always checks http for the IP '192.168.1.20', regardless of what host
foo's IP is set to.



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&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