[mrtg] Re: Threshold Program Help

Bastian Pese Bastian.Pese at psb.de
Sat May 24 09:05:43 MEST 2003


When the Script only run from your Command line with Perl infront, tried this:

ThreshProgI[sb-cr_13]:'perl /export/home/nlatif/scripts/cr-bw.pl'
ThreshProgO[sb-cr_13]:'perl /export/home/nlatif/scripts/cr-bw.pl'

Bastian

Naman Latif wrote:

Hi,
I have a perl script that I want to run, when a certain Threshold Value
is reached. My Config file looks like

ThreshMaxI[sb-cr_13]: 60
ThreshMaxO[sb-cr_13]: 60
ThreshProgI[sb-cr_13]:/export/home/nlatif/scripts/cr-bw.pl
ThreshProgO[sb-cr_13]:/export/home/nlatif/scripts/cr-bw.pl

The script runs fine from Command line as "perl cr-bw.pl whatever 56
67".

However through mrtg I get this error
Can't exec "/export/home/nlatif/scripts/cr-bw.pl": No such file or
directory at /usr/local/mrtg-2/bin/mrtg line 1468.
Can't exec "/export/home/nlatif/scripts/cr-bw.pl": No such file or
directory at /usr/local/mrtg-2/bin/mrtg line 1468.

Script is something like

$objectname=$ARGV[0];
$thresh=$ARGV[1];
$curthresh=$ARGV[2];
open (SENDMAIL, "|/usr/lib/sendmail -oi -t") or die "die\n";
print SENDMAIL <<"EOF";
From: syslog\@xxx
To: aaa\@xxx
Subject: Cr-Sb BW Saturated Current Value for $objectname is $curthresh kbps.
EOF
close (sendmail);



Any help ?

\ Naman


-- 
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

--
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