[mrtg] Re: Alert on No Response

jrb JeffWorking at hotmail.com
Wed Jul 17 09:11:52 MEST 2002


Thanks everyone for the feedback.  There were some good ideas, but I think
Garth's suggestion to run a separate SNMP query will be the best solution
for me.  Jan's idea to use the '--logging' option may actually be the better
choice (since it's a direct test of MRTG's success), but I'm forced to use
an older version of MRTG, before the '--logging' option was added.

It just occurred to me that I can redirect stderr, so that may be the way to
go afterall.

I also wanted to include some notes, in case anyone else searches the
archives for this problem.  I believe GREPing the '.log' or '.html' files
would only detect a problem after the device started responding again, since
MRTG doesn't write to these files if the SNMP query times-out.  Thresholds
in the '.cfg' file are also not triggered if the query times-out, as far as
I can tell.

I believe the above is accurate for 2.9.6 and 2.9.21.  Please let me know if
I'm mistaken.

Thanks again,
jrb


----- Original Message -----
From: "Koelstra, J. (Jan)" <JKoelstra at MINSZW.NL>
To: "jrb" <JeffWorking at hotmail.com>; <mrtg at list.ee.ethz.ch>
Sent: Tuesday, July 16, 2002 2:32 AM
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