Measuring internet consistency with, plotly and docker

While measuring latency of your internet link over time is as simple as something like this;

I couldn’t find anything which would give a good measure of bandwidth consistency over time.

Now this is understandable, you need to use bandwidth to properly measure bandwidth (especially if you don’t run the infrastructure), so it’s a less useful tool in the regular network engineers arsenal, with useful tools such as Speedtest.NET designed for a one-off, point in time check of internet speed.

But with considerable oversubscription common amongst home ISP’s, I was looking for a way to graph trends in my internet connectivity, at an interval which wouldn’t cause the network issues, but would give me a lot more insight than the occasional, manual test.

This is when I stumbled upon; An excellent python implementation of the web-browser client for the Speedtest.NET. Suddenly, we have a decent command line interface to Speedtest.NET!

There are even options to output the results to CSV or JSON, ideal for most!

But what if we want this to be truly hands off monitoring? Enter and Docker!

Plotly gives us an API and python bindings to easily submit and update data to a plotly hosted graph… for free (as long as the graphs are public, which is cool).

So I added some basic plotly support.

Gives us a graph in plotly like this…

Run it again; you get a second data point.

Enter docker… and we can package this up into a one-hit measurement command which will run anywhere, adding each new dataset (with timestamp) to the graph.

You can run this yourself with one command;

All you’ll need is a API key (which you see us passing into the container with the  -v directory mount).

I’ve added more plotly info to the readme in the PR to speedtest-cli for those that want to know more;

And here’s my live graph (click for live).