My Internet goes down fairly often so I want to start keeping track of it.
If you want it REALLY easy, you should be able to write a simple bash script that, when called, pings an arbitrary always online website like google, and if the ping returns an error, sends a telegram message to your phone. you could also store the current state in a separate file to allow for “is now down” and “is up again” differentiation, then use the telegram message timestamps to “track” (loosely used term) up- and downtime. To call the script, add it to your crontab and specify your test interval there.
Getting bash to send to telegram is ridiculously easy, as seen here: https://hackernoon.com/how-to-create-a-simple-bash-shell-script-to-send-messages-on-telegram-lcz31bx. This is EXTREMELY barebones, but it’ll get the job done if you need zero bells and whistles.
Probably the only true way of knowing is by setting up an EXTERNAL host somewhere on a VPS or maybe a reputable VPS provider. Then, on that provider, set up Uptime Kuma, or if you don’t want to go through that trouble and don’t mind a potential 10 minute gap in knowing, https://uptimerobot.com/ which checks every 5 minutes and sends an alert.
Once you do this, unless you have a Static IP, you will want to register with a DDNS provider so you can then tell the uptime service to ping your DDNS host which should echo back . If your internet is down, it won’t echo back and then it will trigger their alert. Of course, this won’t work if your IP changes, so staying on top of that is key unless you use a router which auto updates it which a lot do now days.
Or, if you use Cloudflare Tunnels, it can be configured to alert you when the tunnel is down or unhealthy (A.K.A. No internet or the server is rebooted).
pfsense had tracking of the gateway built in, check your router to see if it already has something.
I use https://healthchecks.io/ for it and find it useful
Since I already run netdata, I have set up a few ping checks. The results are graphed alongside other netdata charts.
Otherwise, the simplest method is going to be a custom shell script that feeds
ping
results to a plotting program likegnuplot
.What’s the problem with smokeping though?