Internet Service Providers... Bastions of honesty and transparency, right?
Well, yeah, no. I can't even say that with a straight face.
Here in St. Louis, I have two options for my Internet:
I can get gigabit cable Internet from Spectrum, or 75 megabit DSL from AT&T.
That's it.
And you're probably like, "Oh, gigabit, that's fast, why would you complain?!"
Well, first of all, gigabit just means 930 megabits down,
but only 40 megabits up. And that's the highest plan that costs about $150 a month!
Yeah, first world problems here. But much of the world is way better. And is a gigabit really
a gigabit? You probably don't know if you're getting the Internet experience you're paying for.
Well, I do. And it's not hard to do it—all you need is a $35 Raspberry Pi! And you don't
even need a Pi, you could run the stuff I'm going to show you on any computer.
I just like having a dedicated computer to run all my Internet connection tools,
so it's easy to backup or replace, and it doesn't ever get bogged down.
I call this my "Internet Pi", and I have it in this fancy network rack, but it could just as
easily be on my desk, or hanging up in a closet somewhere near my Internet router.
The most important thing for measuring a network connection is that it's wired.
WiFi, especially on the Pi, fluctuates quite a bit and is terrible for monitoring
anything besides maybe WiFi signal strength.
The Internet Pi is running a few services, most notably Pi-hole for DNS privacy and ad-blocking,
and Grafana dashboards that show me my Internet connection in real-time.
And the cool thing about this project being open source is you can modify it to suit your needs
exactly. For example, if you have an ISP like SpaceX's Starlink, you can
also monitor every detail of Starlink's connection over time using this dashboard.
Or if you want to monitor something like the power
consumption of an appliance in your home using a Shelly Plug,
like the one I have my Starlink router plugged into, there's a dashboard for that too!
And having a Pi monitoring my Internet continuously makes it easy to see trends
over time, or confirm outages. If you just spot check by running a Speedtest every now and then,
you don't have much data to go on.
I set up this Raspberry Pi using my free and open source "internet-pi" project on GitHub.
There's a link to it below. And it's really easy to set it up, especially if you just
need Pi-hole or Internet monitoring, and don't wanna install any other dashboards.
I set up my Internet Pi from another computer, but you could also run the Internet Pi playbook
on the Pi itself. Following the install instructions, you need to have a Pi set
up with Raspberry Pi OS running on your network, and be able to SSH into the Pi.
You download the internet-pi repository to your computer,
make sure you have Ansible installed, install the Ansible Galaxy content that's required to
make the playbook work. Then you copy the example inventory and configuration files
and modify them for your own needs, and run the playbook.
The playbook will automatically install all the tools you choose in your configuration file,
and once that's done, you should be able to access your Pi's IP address in a web browser to see
Pi-hole, or visit the IP address with this extra bit on the end to see the Grafana dashboards.
If you wanna use Pi-hole as your home network's DNS server, the best way is to configure your
router to advertise the Pi's IP address as the primary DNS server for your whole home network.
For extra redundancy, you could actually configure two Pis running Pi-hole, but I'm
not currently doing that, and getting two Pi's synced up is a little out of scope for this video!
But the great thing is, now you can see all the DNS requests your devices are making,
and make sure things like so-called 'smart' TVs don't send tons of information to advertisers.
Pi-hole is a great first line of defense for your Internet privacy, at least at home,
and it even has some other neat tools like a simple DNS server, if you wanna use them.
The Internet monitoring dashboard is automatically configured for you,
but it can take up to an hour before you start seeing data.
In my case, it's been running for a couple months,
so I can see the Internet connection for the past day, week, or even longer!
The way this works is there's a Docker container running in the background that
connects to Speedtest.net. Every 30 minutes or so, another Docker container running Prometheus
asks the first container to run a speed test.
It stores that data on the Pi, and then the dashboard displays it over time.
There's another service that does simple checks on websites you can configure—in
my case I check a connection to GitHub, Google, and my personal website.
And those checks are performed every few seconds,
to give a very fine detailed view when there is more latency in your Internet connection.
One thing I found interesting was that my Cable internet connection—which
is supposed to be one gigabit, is only really about 700 Megabits on average.
Cable Internet speeds can vary dramatically depending on what
other people in the neighborhood are doing, and how your ISP has it set up.
Fortunately, my upload speeds are pretty consistent, and since that's what I care
about the most, I'm willing to pay the high price for my plan. But I'd be a lot happier
with 50 or 100 megabits of asymetric data, since I'm not downloading terabytes of files every day.
There's also a latency gauge, showing the average latency over the selected time period,
and my latency is pretty good, but not amazing, at about 16 milliseconds.
The main reason I set this stuff up was to compare my Gigabit Cable internet
to SpaceX's Starlink Internet.
And you can see Starlink's connection is a bit less stable. That's not
really Starlink's fault, though. I have trees all around my house,
so there's no way to get a clear sky to make Starlink work all the time.
Anyways, the main thing I wanted to see was the averages. When Starlink is connected,
it looks like on average, I'm getting over 150 Megabits down,
and 15 megabits up, with 40 milliseconds of latency.
Now, those numbers are less than my Cable ISP,
sure. But Starlink also costs less per month—it's only $99.
And Starlink is also beaming the Internet through satellites up in the sky! For someone who doesn't
have a fast Cable option, and is living with dial-up Internet speed, that's not so bad!
But I mentioned earlier, there's also a Starlink-specific dashboard that gives
all the details you'd normally find in the Starlink App.
I haven't been actively using the Starlink connection today, so it's a little barren, but
it gives a ton of detail, and I'd like to thank DanOpsTech for making this possible; it uses his
Docker image and dashboard, and he even made it work on the Raspberry Pi after I asked about it!
Prometheus and Grafana are the tools I used to make these dashboards, and they can do a ton
of other things too. I bought a Shelly Plug, which is a 'smart' WiFi power plug that can
report power usage. I noticed it didn't have any easy way to get its data into Prometheus,
so I made a little data exporter, and now I have this dashboard,
showing me how much power Starlink's router and dish use all the time.
That's... a lot. But I'll cover Starlink more in a review video soon. Subscribe so you don't miss it!
You can read more about how I set up the Shelly Plug for power monitoring on my blog.
There's a link for it in the description
This video was meant to show you how I'm making my Internet experience better with a Raspberry Pi.
And now I know exactly how much my ISP is fleecing me for Internet.
In Spectrum's case, it looks like they're only giving me about 3/4ths of what I pay for.
I wish I could just pay them $110 a month instead of $150,
but if I did that, they'd cancel my service, and I couldn't upload these YouTube videos anymore!
I'd like to thank Max Andersen for the original monitoring configuration, the developers behind
Pi-hole for making it free and open source, and especially Miguel, who maintains the speedtest
exporter, for his help getting some bugs fixed! Let me know in the comments what other neat
things you want to monitor with a Pi, and until next time, I'm Jeff Geerling.