|
|||||||||||
|
[Nagiosplug-help] Help with passing Nagios variables to custom plugin
From: Zembower, Kevin <kzembowe(at)jhuccp.org>
Date: Fri Sep 28 2007 - 15:12:56 EDT
# Use this line below to dump the environment variables for debugging system "env|sort >/tmp/plugins_env.$$";
This seems to work correctly, and I end up with:
which is exactly what I expected. Then I tried to use this value with:
my %NAGIOS_ENV = map { $_ => $ENV{$_} } grep /^NAGIOS_/, keys %ENV;
} elsif (defined($NAGIOS_ENV{NAGIOS_HOSTADDRESS})) {
$hostaddress = $NAGIOS_ENV{NAGIOS_HOSTADDRESS};
This outputs:
and the plugin fails. Any suggestions on what I'm doing wrong or overlooking? Thanks for you advice and suggestions. -Kevin
Kevin Zembower
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ Nagiosplug-help mailing list Nagiosplug-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagiosplug-help ::: Please include plugins version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null Received on Fri Sep 28 15:13:16 2007 This archive was generated by hypermail 2.1.8 : Mon Oct 08 2007 - 18:06:15 EDT |
||||||||||
|
|||||||||||