[mrtg] Re: Thresholds Question

Justin Shore listuser at vinnie.ksu.ksu.edu
Mon Feb 28 21:43:50 MET 2000


My setup was similar except I output the number of times the script 
has been run to a file.  It mails the first time and the 20th time. 
Reason being is that MRTG gathering that data every 3 minutes for me. 
3 minutes * 20 itterations = user will get the mail when it happens 
and for every hour after that until the threshold issue has been 
resolved.  The script for the threshold OK part just removes that 
itteration file.  It works pretty well.  Using that logic you could 
run other commands or page a user with it.

Justin

At 11:31 PM -0500 2/28/00, Bradford Woodcock wrote:
>I could be wrong but I think mrtg wants to 'execute' the threshold script
>each interval until it clears. In instances as this in the past I've
>handled a requirement like yours by putting a small bit of intelligence
>into the threshold script. The logic goes something like:
>
>if threshold=set then:
>- check to determine if a file exists in a directory (the filename in this
>case would be based on the target name)
>- if the file does NOT exist then 'notify' and create file
>- if file does exist then do nothing (or maybe overwrite file with new
>threshold)
>
>if threshold=clear then:
>- remove file
>- maybe 'notify' if you want to know when it clears
>
>a cheap and dirty trick to keep the state of a threshold
>
>cheers,
>brad...
>GTE-Internetworking
>
>At 03:50 PM 2/28/2000 +1000, Garry Judge wrote:
>  >How do I get MRTG to send the Threshold broken message
>  >only the first time it is broken?  I am using the ThreshDir option so
>  >that it notifies me when all is OK again but I get the other messages
>  >every 5 mins.
>  >
>  >Looking forward to your reply.
>  >Thanks
>  >
>  >Garry Judge
>  >
>  >--
>  >Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
>  >Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
>  >Archive     http://www.ee.ethz.ch/~slist/mrtg
>  >
>  >
>
>--
>Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
>Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
>Archive     http://www.ee.ethz.ch/~slist/mrtg


--
Justin Shore
K-State Linux Distro Mirror, Sysadmin
macdaddy at vinnie.ksu.ksu.edu
<http://vinnie.ksu.ksu.edu/mirror/rpm2html>
<ftp://vinnie.ksu.ksu.edu/pub/mirror/linux>

*Internet2 Users*
<ftp://quest.ksu.ksu.edu/pub/mirror/linux>

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg



More information about the mrtg mailing list