On Wed, 29 Jan 2003, Mark Enzinas wrote:
> Hello all, I am new to nagios and have found it ideal for monitoring our
> network except for this one detail. I am hoping someone familiar with
> the structure of nagios can comment on which would be the more elegant
> solution. In my network most of our boxes have our services listening on
> diferent aliased ip's on the same host. One suggestion from this email:
> http://sourceforge.net/mailarchive/foru ... um_id=1873
> and
> http://sourceforge.net/mailarchive/foru ... um_id=1873
>
> Basically, they suggest the followng two options, make a host entry for
> each virtual ip or set up a services that use custom commands that takes
> an ip as an argument. Both of these are basically hacks to allow the
> desired functionality, however to have all the default plugins work and
> not get many alerts when there is a host problem.
>
> I can think of two soultions that would be backward compatible with the
> current configs: 1. create host entries for each ip. One is the main
> entry, the rest are virtual host entries which add an optional Directive
> (for example: virtual_host_parent [hostname] ). This would indicate the
> host entry was actually part of the host parent [hostname] and would be
> associated accordingly. The advantage of this plan is the current nagios
> would behave the the same as now, and simply create a host entry for
> each and not associate it to the main host entry.
>
> 2. The second method would be to create a new definition called a
> VirtualHost definition. this would functionaly be the same relationship
> to the Host definition as the Host is to the HostGroup definition. It
> would still need the new directive virtual_host_parent (or a better
> fitting name) that would point at the main host entry.
>
> Does anyone have any thoughts, based on their knowledge of how nagios
> functions, as to which would be the better solution to proceed with?
>
> I realize that this seems similar to simply using individual host
> entries for each ip, but it would give much more flexability in allowing
> nagios to understand the relationships that exist. Performance data can
> be polled for just the main host entry, and only one host alert will be
> sent when there is a whole host problem (also they would be nicely
> combined into one host in the graphical network maps) The advantage
> against using the service definitions to poll the services on ip's
> different than the host is one would be able to use the default plugins
> without having to pass which ip to check. (which isn't a terrable
> solution but not super elegant) THanks everyone for any constructive
> comments. Mark.
>
A virtual IP is a service on the host and should be treated a such. The
services on the virtual IP should use command definitions that accept
$ARG$ instead of $HOSTADDRESS$
To allow virtual services to fail on the failure of vcirtual ip - define a
service dependency of the virtual services on the appropriate virtual ip.
Remember when monitoring - it is necessary to know and monitor the
details, even though virtual services are designed for portability without
users knowing.
--
-sg
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: sghosh@sghosh.org