Simple ISP connection monitoring

Recently I got utterly titsed off with my ISP denying that there was a problem with my connection. At certain times every day, my connection would drop, I would ring them up, and they would claim there wasn’t a fault.

In the end, I found out that one of the other flats had had Sky TV and Broadband installed, and the installer had damaged the cabling to my system.  My connection would drop each time the neighbour moved his car off the driveway, as one of the wheels would slightly jog the cable that the Sky Goon had damaged.

So, how did I work this out?

Well, using my half-remembered knowledge of HTML, PHP, BASH and CRONTABS, I boshed up a tool to keep track of when the connection dropped.

You’ll need a Linux box which Apache and PHP installed. So go and get a Raspberry Pi, set it up and install a LAMP stack.

 

Front page:

Inet Events Log (connection to ISP):

Router Events Log (whether your router is up/down):

Combination of the two:

Full per minute log:

These just show my connection as being “UP”, as it has been working recently, and I have to delete the log files due to space problems (the main log file had grown to fill the root partition of my webserver!)

To see my “live” version (if my connection is up, and my IP address hasn’t changed again since I reset the DNS), try http://recnet.uk:8103/netlog/

Basically, every minute Cron calls the ping tester to check the connection to the local router and the main Google DNS server. I picked that one as Google is highly unlikely to go off line.

You can grab this thing from Github if you think you might find it useful. This is my first Git, so be cool, don’t be cruel.

 

 

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.