Use a Raspberry Pi to monitor your Virgin Media Superhub - MyHomeBroadband.com
 
Use an app called SmokePing to monitor your Superhub and the DOCSIS network that powers it.

This guide http://blog.kugelfish.com/2013/05/raspberry-pi-internet-access-monitor.html is an excellent start, but I found it missing a few things, so here's my way:

Install Smokeping onto the Pi

sudo apt-get install smokeping

This is a big download, and also installs the Apache2 web server, so be aware of this.I changed the default port of 80 (I will cover this later on)
Once downloaded, and installed, you need to change the Targets and Probes-here's mine (you don't need to use it but they are more relevant to me)

So Targets are accessed by sudo nano /etc/smokeping/config.d/Targets. I would delete everything in this file and cut and paste the following

*** Targets ***

probe = FPing

menu = Top
title = Using a Raspberry Pi and SmokePing to Monitor DOCSIS Networks
remark = Latency to a few select sites and services in the Internet, via the VM DOCSIS network

+ Internet
menu = Internet
title = Outbound from the Pi to the Internet (using Ping)

++ Google
title = Google
menu = Google
host = www.google.com

++ FB
title = Facebook
menu = Facebook
host = www.facebook.com

++ BBC
title = BBC
menu = BBC
host = www.bbc.co.uk

++ ThinkBroadband
title = ThinkBroadband
menu = ThinkBroadband
host = www.thinkbroadband.com

+ DNS
menu = Measuring DNS response times
title = Name Servers

++ gdns
title = Google public DNS
menu = Google public DNS
probe = EchoPingDNS
dns_request = www.google.com
host = 8.8.8.8

++ VirginMedia_DNS
title = VirginMedia DNS
menu = VirginMedia DNS
probe = EchoPingDNS
dns_request = www.google.com
host = 192.168.0.1

+ Cloud
menu = Cloud
title = Response of well known Cloud Services

++ dropbox
title = Dropbox
menu = Dropbox
probe = EchoPingHttp
host = dl.dropboxusercontent.com
port = 80
url = /u/12770892/benchmark/raspberrypi.jpg

++ gusercontent
title = Google+ Photo
menu = Google
probe = EchoPingHttp
host = lh4.googleusercontent.com
port = 80
url = /UB5Y5yJKtj51bs2asd8kJGjOxwigev7JPQz3g9tw1C0=w614-h801-no


Note that the DNS host for the Virginmedia DNS check is the default IP address of the VM Superhub (192.168.0.1).I tried 194.168.4.100, but it 
wouldn't work.

now for the  Probes sudo nano /etc/smokeping/config.d/Probes

*** Probes ***

+ FPing
binary = /usr/bin/fping
step = 60
pings = 10

+EchoPingDNS
binary = /usr/bin/echoping
step = 300
pings = 5

+EchoPingHttp
binary = /usr/bin/echoping
step = 300
pings = 3


Again, I have changed the default polling for the ICMP checks from 300 seconds to 60 seconds.And the HTTP polling is down from 900 to 300.

What you want to do now is change the default port on the Apache web server, from port 80 to some other (I chose 6666).This is basically to add a bit of security if somebody port scans you. This web page is a good guide
http://www.cyberciti.biz/faq/linux-apache2-change-default-port-ipbinding/ so:

sudo nano /etc/apache2/ports.conf

change

NameVirtualHost *:80
Listen 80


to

#NameVirtualHost *:80
#Listen 80
NameVirtualHost *:6666
Listen 6666


save and come out.Commenting out the 80 port means its not used.I left the 443 port in for SSL, but to be honest, this is not super secret stuff we are pulling back here!! Onwards...

go into

sudo nano /etc/apache2/sites-enabled/000-default

on the line 

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

change it to

<VirtualHost *:6666>
        ServerAdmin webmaster@localhost

save and come out.

You should now have Smokeping installed, your Probes and Targets set up, pimped up the web page it will be displayed on, and changed the web server port.Now restart the Smoke ping service

sudo service smokeping restart

and restart Apache

sudo /etc/init.d/apache2 restart

There shouldn't be any errors-you may get one about the loopback interface (127.0.0.1) but I found this can be ignored. To be on the safe side, you may want to reboot the Pi, but that's up to you.

Once you think it is all working type in the following to your favourite web browser:

http://x.x.x.x:6666/cgi-bin/smokeping.cgi? where x.x.x.x is the PUBLIC IP adress of your VirginMedia Superhub. However, before you do this, there is one final thing-you need to open up that port (port 6666, or whatever you choose, or if you have left it at the default of 80) on the Superhub diagnostic pages. I'm not going to go through it here, here is a link on how to do it http://goo.gl/szKTK4 If this doesn't work, just Google "open a port on virgin media superhub".

That should be it-if successful, you should get a web page up, and some links down the side-click on them.The page should update itself automatically every minute, so no need to refresh. Have a play, leave it for 30 mins or so, and you should see the graphs update themselves.
Here's an example of what you should see:
I hope this helps someone, as I have found the incumbent,ThinkBroadband, to be very mis-leading.Below is the Thinkbroadband graph, inbound to the Superhub.The next one is SmokePing, outbound from the Pi to Thinkbroadband
For those that don't know, ThinkBroadband pings the Superhub every second, and people then look at the yellow spikes as a measure of their performance.These yellow spikes are the highest PING time recorded in a 100 second period-so you could have 99 PING's at 20ms, and one at 140ms-it will be the 140ms one that is displayed!
3/24/2014 03:12:30 am

Thank you very much for this post! I have setup 1 of my Raspberry Pi's to ping out and give me the stats!

It works a charm and your post made it very easy to get it installed!

Reply
cabs
3/24/2014 03:21:14 am

Vincent
Glad it helped. Some updates on the post-you may want to change the Apache port to something other than 6666, as this port is blocked by Chrome (if you use it). I changed it to 54321.
Also, if you find the Pi missing pings, you can cut down on the some of the pages you ping too-I only have two now, Thinkbroadband and the BBC.

Reply
3/24/2014 04:44:38 am

Hi,

Mine seems to be fine. I have left it running on port 80 at the moment.

I have also replaced the cloud ping with a link to a file on my own cloud server as yours was blocked by heavy use!

Thanks.

3/24/2014 04:45:09 am

Hi,

Mine seems to be fine. I have left it running on port 80 at the moment.

I have also replaced the cloud ping with a link to a file on my own cloud server as yours was blocked by heavy use!

Thanks.


Your comment will be posted after it is approved.


Leave a Reply.