[mrtg] Re: Alert on No Response
Steve Nichols
steven at viclink.com
Tue Jul 16 11:36:48 MEST 2002
If you query the html file directly, grep for the total bw used
Create 2 files
One to grep the bw used
One to report if the result is 0.
Add it to your crontab
We do this with bash scripts and perl.
Or grep the log file ( whatever.yourserver.com_xx.log)
If the results are all 0 have it send you a distress email or page your
cell or write it to a new log file.
We do both every 5 minutes.
Very effective.
You can also use the first one to monitor bandwidth, if it is to high,
email you. If it is to low, email you, etc....
Steven Nichols
Network and Systems Administrator
Internet and NOC Manager
VALLEY INTERNET COMPANY
1709 NE 27th Street, Suite C
McMinnville, Oregon 97128
503-565-5030 or 800-909-9078 (toll-free)
"Pay no attention to the folks behind the curtain..."
PGP: www.viclink.com/~steven/steven.nichols.pgp.txt
-----Original Message-----
From: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch]
On Behalf Of Koelstra, J. (Jan)
Sent: Tuesday, July 16, 2002 00:33
To: jrb; mrtg at list.ee.ethz.ch
Subject: [mrtg] Re: Alert on No Response
Hi,
If you start MRTG with '--logging=<filename>' you get all the failures
in a file. From here it should be easy to write a script that takes the
actions you want.
Jan.
-----Original Message-----
From: jrb [mailto:JeffWorking at hotmail.com]
Sent: Tuesday, July 16, 2002 7:21 AM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] Alert on No Response
Hi everyone.
I have a question that I thought would be common, but only shows up in
the archive a couple times with no responses. What I'd like to do is
call a shell script when a device fails to respond to MRTG.
I'm fairly new to Linux and MRTG, so there may be an obvious way to do
this that I'm missing. My first thought was to test the MRTG result
code, but it seems to return 0 even if the device fails to respond (I
think this is because I'm actually seeing the PERL result, which was
successful).
I also considered doing this outside of MRTG by writing a shell script
to ping the device every 5 minutes and report failures, but this won't
account for times when the ping succeeds and MRTG still fails to get a
response.
Any suggestions you can offer would be much appreciated.
-jrb
--
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