From: Andreas E. <ae...@op...> - 2006-09-26 08:18:43
|
Thomas Guyot-Sionnest wrote: > While implementing traps I recently noticed that you can report status as > passive check using either the sort name (matching "host_name" entry) or the > IP Address (matching "address" entry), but not using the "alias" entry. > > In the Nagios documentation it is recommended to use the FQDN in the "alias" > entry, and it makes sense as it's useless to have the domain name appended > to each host, which is in many setups probably the same. > > Is there any good reasons why we can't use the "alias" entry to match hosts? > If the alias entry have to be unique I don't see where this could be a > problem... > The alias entry doesn't have to be unique, and so can't be used to submit passive checks. In all fairness, the address field doesn't have to be unique either, although for the passive check feature to work checks are expected to arrive from a particular host and the admins are expected to not have more than one host-entity in nagios with the same address (that accepts passive service-checks anyway). Iow, the "match on $HOSTADDRESS$" feature is reasonable because the IP-addresses are generally unique anyways, and it saves passive check submitters the trouble of looking up the host_name entry in the nagios config. The alias field is used much more freely and often contains things like "SQL server 2 - mirrored from sql-srv1" which really doesn't make sense to use. On the other hand, nothing prevents you from either using the FQDN in the address field, resolving the inbound fqdn to the IP-address, or stripping the domainname from the fqdn when you submit the passive checks. All three are relatively simple solutions, and all are much better than allowing passive checks to be entered using the host-entity's alias field. -- Andreas Ericsson and...@op... OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 |