[mrtg] Re: Change in Thresh handler

Martin Rheumer martinr at hotkey.net.au
Fri Jan 11 18:14:10 MET 2002


I found both ways of thresholds help and have used a script to 
delete the threshold value from the location where it is 
stored. Something like this.. 

In the cfg file.

SetEnv[target]: CFG_NAME="target"
ThreshMinI[target]: 1
ThreshProgI[target]: /usr/local/mrtg/bin_thresh/mail_thresh.pl

Setting an environment variable for the value of the [target]

Then in the threshold script. ( Which is perl )

$cfg_name = $ENV{"CFG_NAME"};

$new_name = "$cfg_name.cfg.$rac_name.minI";

$filename = "/usr/local/mrtg/thresh_tmp/$new_name";
unlink ($filename);

Which deletes the file used for holding the whether the threshold
has been reached and deleting it.. Thus the next time it checks
the threshold is run again no matter what.

Hope this helps.


At 02:29 PM 1/10/02 -0500, bwoodcoc wrote:
>I have recently upgraded from 2.7.5 to 2.9.17 and have noticed a change in 
>the handling of thresholds (I think). In the old version script execution 
>was every breach of the threshold (potentially every 5 minutes) and then on 
>the clear. In the newer version it seems that execution is on the initial 
>breach and then on the clear with NO execution for contiguous 5 minute 
>occurrences between the two.
>Reading the docs it probably "functions as designed" with 2.9.17 given 
>folks are generally using it for notification (email, page). However I 
>found the old technique useful for error analysis and alarm display. This 
>is because I was capable of logging every incident of threshold violation. 
>I was then able to roll up totals and averages of each error type for 
>targets in a topN fashion to highlight trouble spots. This now does not 
>seem possible at least using this technique. Also every alarm was written 
>to an additional directory for an web alarm manager display and therefore 
>always showed me the current values on my net.
>Are my assumptions of threshold operation for 2.9.17 correct and is there 
>any way (an option) to convert back to the previous? I checked the docs but 
>did not see any technique as yet.
>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