Dead gateway detection
C. Ed Felt
ed at thefelts.net
Wed Apr 13 10:51:50 MDT 2005
I wrote a Python script (soooo much easier than perl :-) ) that uses
ping but also has a backoff algorithm built in, (only does what it needs
to on a 1, then 5, then 10 etc. on up to 40 min. interval). I also just
use cron to run the script every minute. With an RPS-10 (about $90)
hooked to the COM port on the server, it actually reboots the DSL Modem
if the ping fails via an expect script. I also have cron save a log
file (with ">>") each time so we can look back and see if and when the
connection is going down. If I had time I would probably update it to
use a databse. If you wanted to watch for a dead gateway in real time,
you would just have to put what I have done in a while loop and run it
(no cron). In short, ping is the only way I know of to watch for a dead
gateway, unless you want to so some SNMP level programming, (which
Python has a module for).
Let me know if you would like me to send it to you,
I have some asterisk questions, (IPCentrex, Voice Mail, Call routing,
H323<-->SIP translation etc.), any Asterisk experts out there?
Gabriel Gunderson wrote:
>I'm setting up a box with two connections going out to different ISPs
>for a small business in town. The second was just for a backup but they
>wanted to be able add its bandwidth to that of the first for out going
>traffic. On a failure the traffic goes out the one connection.
>I think I have it all working but I'm still looking for an elegant way
>to detect a dead gateway. I have a cron job that uses ping to check
>each gw. It works but it's a little clunky and only checks every
>What have you all done to detect dead gateways?
>| This has been a P.L.U.G. mailing. |
>| Don't Fear the Penguin. |
>| IRC: #utah at irc.freenode.net |
More information about the PLUG