[mrtg] ThreshProgI
mrtg at diesel.yi.org
mrtg at diesel.yi.org
Thu Feb 1 20:44:44 MET 2001
I am currently graphing ifOperHack to show the status of the T1 interfaces
on a 7206. The graph simply charts a 1 for up and a 0 for down. I added
the following to try and get MRTG to send me an email if an iterface goes
down.
Target[hostname_T1_2_3]: ifOperHack.7&ifOperHack.7:public at hostname
MaxBytes[hostname_T1_2_3]: 1
YScale[hostname_T1_2_3]: 1
Options[hostname_T1_2_3]: gauge, unknaszero
YTics[hostname_T1_2_3]: 1
ThreshMinI[hostname_T1_2_3]: 1
ThreshProgI[hostname_T1_2_3]: `/usr/mrtg/bin/page.pl`
YLegend[hostname_T1_2_3]: Up (1) down (0)
Title[hostname_T1_2_3]: T1 2/3 -- hostname
PageTop[hostname_T1_2_3]: <H1>Port State for T1 2/3</H1>
Here is page.pl:
#!/usr/bin/perl
open(SENDMAIL, "|/usr/lib/sendmail -oi -t -od") or die "Can't fork for
sendmail: $!\n";
print SENDMAIL <<"EOF";
From: Network <network\@network.com>
To: <user\@domain.com>
*Danger* Will Robinson *Danger*
There is an interface down.
EOF
close(SENDMAIL) or warn "sendmail didn't close nicely";
The program page.pl by itself works fine and sends the email to the
address. But when I try to run mrtg with the Thresh* options in I get the
following error:
ERROR: CFG Error in "threshprogi[hostname_t1_2_0]", line 18: Threshold
program `/usr/mrtg/bin/page.pl` cannot be executed
Any ideas? Is there a variable being passed to page.pl that I have to take
into account?
Cheers,
Jeff
--
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