Monitor Your Internet Connection
WLAN Pi as an internet monitor
Last updated
WLAN Pi as an internet monitor
Last updated
When an internet link goes down, most users will report that the βWi-Fi doesn't work!β
How reliable is your internet link? The next dashboard can help you quantify that and find the smoking gun. Was it the Wi-Fi, was it DNS, or was it actually your internet provider's planned maintenance early Sunday morning?
Open the Internet Monitoring dashboard.\
It feels a bit lonely here, doesn't it? Don't you worry, that's because our WLAN Pi has not started collecting data yet.\
The purpose of the Data Stream is to collect data and feed it to the associated dashboard. In this instance, our Data Stream script measures the speed of your internet link, runs a few ping tests, and checks how fast your DNS server responds.
Head over to the top Grafana menu bar item, click the play (βΆ) button next to Internet Monitoring.\
The Data Stream will now become active. Every 5 minutes, it streams data to the Internet Monitoring Grafana dashboard.
How is the internet connection in the room holding up?\
If you find the 5-minute interval too great, try restarting the βInternet Monitoringβ data stream script
All the data you are viewing is only stored in the browser cache, if you navigate away from the dashboard page, all data collected so far will be lost. This can be addressed by using an external data store (not in-scope of this lab).
Out of the box, Internet Monitoring dashboard uses librespeed-cli
an open-source package for internet speed testing. In some scenarios, we have found the proprietary speedtest CLI
tool developed by Speedtest.net to deliver greater accuracy.
Add the Ookla package repository to your WLAN Pi by executing this command in Terminal:
Install the Ookla speedtest package:
After the installation has finished, execute the command:
Now is the time when you call your lawyer and ask for some free advice. Or simply close your eyes and type YES
in capital letters and press enter key. On serious note, skim through the license terms and make sure you are comfortable.
Secondly, there is a similar, this time GDPR related, prompt. Again, if you want to proceed, type YES
in capitals followed by enter.
Speedtest will automatically run a new test. Wait until it has completed.
Finally, we need to instruct the Internet Monitoring dashboard data stream that you wish to use Speedtest.net. Do so by opening this file in nano text editor:
Add this new line to the end of the file:
To save changes, press Ctrl + O (that's an "o" for omelette). To exit editor, press Ctrl + X.
If the Internet Monitoring data stream has been enabled, disable it using the X and then start it again using the play (βΆ) button.