[mrtg] Running scripts/programs using ThreshProg

Jim Kerick jkerick at arsenaldigital.com
Mon Jul 30 16:48:07 MEST 2001


Okay, I am new at this so don't hit me too hard over the head...

I am setting up MRTG to send e-mail when a thresh hold is meet or exceeded.
Reading the MRTG Configuration Reference manual I add a Global ThreshDir.
To monitor diskspace I did the following:

Target[greyhound.export]:dskPercent.5&dskPercent.8:polar at greyhound
RouterUptime[greyhound.export]: *************
MaxBytes[greyhound.export]: 100
Title[greyhound.export]: DISK USAGE
PageTop[greyhound.export]: <H1>DISK /opt and /export Usage %</H1>
Unscaled[greyhound.export]: mwd
ShortLegend[greyhound.export]: %
YLegend[greyhound.export]: DISK Utilization
Legend1[greyhound.export]: /opt disk
Legend2[greyhound.export]: /export disk
Legend3[greyhound.export]:
Legend4[greyhound.export]:
LegendI[greyhound.export]:  /opt disk
LegendO[greyhound.export]:  /export disk
Options[greyhound.export]: growright,gauge,nopercent,nobanner,nolegend
Suppress[greyhound.export]: ym
ThreshMaxI[greyhound.export]: 50
ThreshMaxO[greyhound.export]: 50
ThreshProgI[greyhound.export]: /export/home/mrtg/thresh/mail.ksh   <-----
Call script to send mail messages
ThreshProgO[greyhound.export]: /export/home/mrtg/thresh/mail.ksh    <-------
Same as above

The configuration reference says:
ThreshProgI (PER TARGET)

This defines a program to be run if ThreshMinI or ThreshMaxI is broken. MRTG
passes 3 arguments: the $router variable,
the threshold value broken, and the current parameter value.

I can find where the $router variable is defined (no I have not read the
source code), and I am not getting any inputs sent to the script.  I tried
to parse the input line, and have set up a script that reads inputs that
arrives on different lines and get nothing.

Please point me in the correct direction.

Thanks,



Jim Kerick
Arsenal Digital Solutions
office: (919) 941-4620 fax: (919) 474-0695 
cell: (919) 522- 4786
++++++++++++++++++++++++++++++++++++
"Don't Panic"
"When in doubt gas it, it ends the suspense and doesn't hurt."
"I may not have gone where I intended to go, but I think I have ended
up where I intended to be." Douglas Adams
DoD # 3.2616 WINNER RCR X -> Tackiest Lawn Ornament Award
'95 GRHD 70
'97 Moto Guzzi California 1100i


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