Inexplicable service escalation behaviour

Holger Weiss holger at CIS.FU-Berlin.DE
Fri Oct 7 14:50:39 CEST 2005


* Ralph.Grothe at itdz-berlin.de [2005-10-07 09:43]:
> Btw, will the macros be exported to external commands' environments
> per default, so that for instance in a Perl script I could refer to
> them by e.g. $ENV{NOTIFICATIONNUMBERS} ? (never mind, more of a
> rhetorical question which I can easily answer myself by trial)

By trial you might miss that they are exported, but with "NAGIOS_"
prepended to their names ;-)

| Macros as Environment Variables
|
| Starting with Nagios 2.0, most macros have been made available as
| environment variables. This means that scripts that are run from Nagios
| (i.e. service and host check commands, notification commands, etc.) can
| reference these macros directly as standard environment variables. For
| purposes of security and sanity, $USERn$ and "on-demand" host and
| service macros are not made available as environment variables.
| Environment variables that contain macros are named the same as their
| corresponding macro names (listed below), with "NAGIOS_" prepended to
| their names. For example, the $HOSTNAME$ macro would be available as an
| environment variable named "NAGIOS_HOSTNAME".

[ http://nagios.sourceforge.net/docs/2_0/macros.html ]

Holger

-- 
PGP fingerprint:  F1F0 9071 8084 A426 DD59  9839 59D3 F3A1 B8B5 D3DE


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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