[mrtg] Question about SetEnv

Max Kipness II mkipness at aztechsolutions.com
Fri Apr 5 22:31:02 MEST 2002

I'm trying to create a perl script that emails admins based on some data
sent via SetEnv. I'm getting the first three built in variables passed
to the script, but nothing else. When I had done the same thing with a
Bash script, however, I got every variable that was set with SetEnv. Am
I missing something? Here is what I'm doing:
SetEnv[httplat-steelecreek-b]: EMAIL="email at email.com
<mailto:email at email.com> "
ThreshProgI[httplat-steelecreek-b]: /etc/mrtg/thresh/test
Here is the contents of /etc/mrtg/thresh/test
printf "@ARGV[0]\n";
printf "@ARGV[1]\n";
printf "@ARGV[2]\n";
printf "$EMAIL\n";
Here is what gets printed out (and emailed to me via a cron error):


Why is the $EMAIL variable not passing to the perl script? Is there
something else I need to do in Perl?



Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the mrtg mailing list