Ideas for new NRPE / Nagios macros

Jason Martin jhmartin at toger.us
Fri Aug 20 17:42:00 CEST 2004


One thought I had was to add a macro to NRPE and Nagios that was
defined as the name of the monitoring host.  For example, NRPE
would define a variable called $REMOTEHOST$ that is populated
with the source IP address of the incoming connection. I'm
assuming this is possible under both the daemon mode and inetd
mode. Nagios would create a variable called $NAGIOSHOST$ that is
the FQDN of the machine executing the checks.

One of the reasons to to this is to allow the remote plugins to
differentiate between different monitoring hosts. The idea is
that if a given plugin needs to retain state across invocations
(ex: The seek file used in check_log2) then it is possible for
two different Nagios hosts (administered by different groups) to
continually overwrite each other's seek file.  If the plugin
knew that one check was coming from host A and another from host
B, it could prepend the host name to the seek file and prevent
the collision.

Another example of when this can occur is if there is a
'staging' nagios host and a 'production' nagios host.  If
configs are tested in Staging and then copied (but not moved) to
Production, the two environments will be competing. Having the
hostname of the Nagios host avaiable would allow for
configurations that inherently don't compete.

Any thoughts on this?

Thanks,
-Jason Martin
-- 
Your weapon was made by the lowest bidder!
This message is PGP/MIME signed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 211 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20040820/e2ccfd51/attachment.sig>


More information about the Developers mailing list