[mrtg] Threshold checking....what am I missing?

Mike Dean mdean at landstar.com
Fri Jun 28 15:06:54 MEST 2002


I'm trying to setup threshold checking with MRTG.  I've read the docs,
checked the archives and the web but haven't found an answer to my problem.
I'm using MRTG version 2.9.18, RRD log format with routers2.cgi as the
front-end.  This is running on a RedHat 7.2 system.

The problem is that the file is never created.  It's as if the Thresh????
options are ignored.  I have tried using a percentage and just a number for
the threshold trigger (the input and output rates are exceeding the values)
however the test file is not created.

The scripts are simple test scripts that output basic information to a file
(in the threshold directory) for testing.  Following is the mrtg-threshold
script.  If I run the script from the prompt (logged in as the user that
runs the MRTG cron jobs), the file is created correctly.  The script that
runs MRTG also runs without errors.  

Thanks in advance!

Mike

The test configuration looks like this (note that the data collection and
graphing works fine):

ThreshDir: /var/mrtg/threshold
.
.
.
Target[192.168.14.2_aaa.bbb.ccc.ddd]: /65.208.82.178:pacman at 192.168.14.2:
SetEnv[192.168.14.2_aaa.bbb.ccc.ddd]: MRTG_INT_IP="aaa.bbb.ccc.ddd"
MRTG_INT_DESCR="Serial3/3.1" MRTG_HOST="jis"
Directory[192.168.14.2_aaa.bbb.ccc.ddd]: 192.168.14.2
MaxBytes[192.168.14.2_aaa.bbb.ccc.ddd]: 202375
ThreshMinI[192.168.14.2_aaa.bbb.ccc.ddd]: 100
ThreshMaxI[192.168.14.2_aaa.bbb.ccc.ddd]: 2048
ThreshProgI[192.168.14.2_aaa.bbb.ccc.ddd]: /usr/local/scripts/mrtg-threshold
ThreshProgOKI[192.168.14.2_aaa.bbb.ccc.ddd]: /usr/local/scripts/mrtg-ok
ThreshMinO[192.168.14.2_aaa.bbb.ccc.ddd]: 5%
ThreshMaxO[192.168.14.2_aaa.bbb.ccc.ddd]: 15%
ThreshProgO[192.168.14.2_aaa.bbb.ccc.ddd]: /usr/local/scripts/mrtg-threshold
ThreshProgOKO[192.168.14.2_aaa.bbb.ccc.ddd]: /usr/local/scripts/mrtg-ok


#!/bin/bash
# MRTG Threshold script
# 
# Following values are passed to the script by MRTG
#
# $1 = $router variable
# $2 = The Threshold value broken
# $3 = The parameter value
#
printf "%s threshold reached:  %s is at %s\n" $1 $2 $3
>>/var/mrtg/threshold/$1.alarm



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