> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:nagios-users- > [EMAIL PROTECTED] On Behalf Of Deborah Martin > Sent: Tuesday, February 19, 2008 9:16 AM > To: 'nagios-users@lists.sourceforge.net' > Subject: [Nagios-users] Accessing macros as environment variables > Importance: High
> Does anyone have any idea of how I can access the macro from a shell > script > for example ? Are the environment variables prefixed with anything ? I > can't seem to find it in the docs or FAQs elsewhere. > Any pointers would be much appreciated! http://nagios.sourceforge.net/docs/3_0/macros.html Macros as Environment Variables Most macros are made available as environment variables for easy reference by scripts or commands that are executed by Nagios. 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 standard macros are named the same as their corresponding macro names (listed here), with "NAGIOS_" prepended to their names. For example, the $HOSTNAME$ macro would be available as an environment variable named "NAGIOS_HOSTNAME". -- Marc ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Nagios-users mailing list Nagios-users@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