

We can use this api from command line and, as it’s a python library, we can create one python script that uses it.Ĭurrent_dir = os.path.dirname(os.path.abspath(_file_)) To monitor the bandwidth we only need to use the speedtest-cli api. This time I want to use Docker (just for fun). It’s simple: “dd if=/dev/disk3 of=pi3.img” 🙂 and I want to rebuild it. Today I’ve lost my quick and dirty script (please Gonzalo keep a working backup the SD card of your Raspberry Pi Server always updated! Sometimes it crashes. Finally I changed it, but meanwhile the my Internet company was solving one incident, I started to hack a little bit a simple and dirty script that monitors my connection speed (just for fun and to practise with InfluxDB and Grafana). I was a bit lazy to switch to a fiber connection.
#Grafana internet uptime monitor free
Note: All the tools mentioned in this article are open source, free to self host, and have been linked to.Time ago, when I was an ADSL user in my house I had a lot problems with my internet connection. It will automatically get the endpoints from your Telegraf configuration. Simply import the dashboard into your Grafana to get all these stats. I would also recommend this great dashboard to show other latency metrics at a glance. Just duplicate the panel and change the IP in the queries to show various latency graphs to different destinations. Now you should have beautiful latency graphs. SELECT max("percent_packet_loss") FROM "ping" WHERE ("url" = '1.1.1.1') AND $timeFilter GROUP BY time($_interval), "url" fill(0) SELECT max("maximum_response_ms") FROM "ping" WHERE ("url" = '1.1.1.1') AND $timeFilter GROUP BY time($_interval), "url" fill(none) SELECT max("average_response_ms") FROM "ping" WHERE ("url" = '1.1.1.1') AND $timeFilter GROUP BY time($_interval), "url" fill(none) SELECT min("minimum_response_ms") FROM "ping" WHERE ("url" = '1.1.1.1') AND $timeFilter GROUP BY time($_interval), "url" fill(none) Now we need to set up Grafana to get the pretty graphs as shown above.Īdd four queries as pictured or written below. # Number of pings to send per collection (ping -c ) Add in as many URLs/IP addresses as you want to ping. Edit the count to be more than 1 in order to get the variance of your latency otherwise your min and max ping are going to be the same.

That is not going to be covered by this article as there are plenty of resources for setting up InfluxDB already.Īfter you've got that going, you're going to need to uncomment the ] block in your nf file. My solution was to use the same graphs but use the in-built pinging functionality of Telegraf.įirst of all, you're going to need to set up Telegraf to connect to InfluxDB then add InfluxDB as a datasource in Grafana.
#Grafana internet uptime monitor how to
It showed how to make the exact graphs I wanted but used a custom pinging solution which doesn't compile any more due to changes with the InfluxDB Go API. When trying to figure out the best way to accomplish this, I stumbled across this article by Tor Hveem from 2015. Grafana's graphs are also a lot more visually appealIing so I wanted to build a solution which would give me SmokePing-like graphs in Grafana. This is a great solution to visualising latency but I also have a Grafana Docker container running for other purposes such as graphing my server's hard drive temperatures and my network throughput using InfluxDB and Telegraf.

It's a very nice tool that is quick and easy to set up and produces graphs like this one below. I use a tool called SmokePing to visualise my home internet latency.
