[mrtg] Threshhold: how to alert only once

Daniel B. Widdis aqua at compuserve.com
Thu Mar 8 03:56:46 MET 2001


I recently upgraded to MRTG 2.9.10 from a previous version and noticed the
new Threshhold script commands.  I've read as much documentation as I can
find in the reference, the FAQs, the mailing list archive, and just about
every linked page on the users sites, and I'm still baffled.  Here's my
problem:

The threshhold scripts run as specified when I exceed the threshhold, but
then they run again, and again, and again, every 5 minutes.  I will show
appropriate lines in my mrtg.cfg file with commentary, and I hope someone
can show me the error of my ways.

RunAsDaemon: Yes
Interval: 5

I assume these threshhold commands work in Daemon mode.

ThreshDir: /root/mrtg/run/thresh

This directory exists and is writable.  When I run MRTG, I get a collection
of files in that directory.  They are all zero size and have a .I extension,
whether I am under or over the threshhold for the various routers.

[root] /root/mrtg/run-=> dir thresh
total 2
drwxr-xr-x   2 root     root         1024 Mar  7 21:07 .
drwxr-xr-x   5 root     root         1024 Mar  7 21:41 ..
-rw-r--r--   1 root     root            0 Mar  7 21:07
mrtg.cfg.206.71.170.159.2.I
-rw-r--r--   1 root     root            0 Mar  7 21:07 mrtg.cfg.cpu.I
-rw-r--r--   1 root     root            0 Mar  7 21:07 mrtg.cfg.df.I
-rw-r--r--   1 root     root            0 Mar  7 21:07 mrtg.cfg.lag.I
-rw-r--r--   1 root     root            0 Mar  7 21:07 mrtg.cfg.mem.I

One of my "routers" monitors disk usage and warns me via email if I'm over
80%.  These are the appropriate lines:

SetEnv[df]: REASON="Warning!  Disk usage of"
ThreshMaxI[df]: 80%
ThreshProgI[df]: /root/mrtg/thresh/thresh.sh

The warnings work just fine, except that I get them every 5 minutes.  I was
led to believe in the references that the presence of a writable ThreshDir
would mean I would only get the warnings once.  Do I need to do something
special in my script?

Thanks in advance for any help.


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