“Please reboot your Modem”
I was a little tired of calling Charter/Spectrum customer service when my internet connection dropped out. And it has been doing that a lot lately. The drops are occurring in 5-10 mimute chunks a few times per day. So by the time I get customer service on the phone and follow their instructions, the issue has resolved itself.
I needed a way to prove that my internet connection was dropping and that it wasn’t my fault.
And I had some new technology I needed to learn for work, anways.
Step 1 – Dockerize all the things
I had been considering moving my cloud-based infrastructure to Docker, and now would be a gold time to execute the plan. In support of this I installed Docker on a Ubuntu 18.04 VM provided by Digital Ocean. I put Portainer over top of it and the results looks beautiful.
Step 2 – Write a cool script
You can click the link at the top for the source code. I still need to turn the actual tweet messages themselves into parameters to make it really portable, but I did an okay job parameterizing the environment variables.
It is a python-based Twitter Bot. The script will query whatever page you specify every 10 seconds or so and, in the event of an outage, wait until your connection comes back on. Then it calculates how long you were down, when the outage started, and when it ended. It commits all this to a SQLite Database so you have an ongoing record of what happened when.
Step 3- Profit
Step 4 – What is next
Spectrum actually answered once – but they seem disinterested in my logging. In any event, I need to figure out how to do a timed execution of tasks from time to time, like announcing speed test results at noon every day or counting all the outages over the last 24 hours. That kind of stuff.
Maybe tie it all back to my monthly bill to determine an exact cost associated with the service failures.
At this point I’d settle for just my damned internet not dropping me 15 minutes into an FOB mission in Metal Gear Solid V.
STEP 5 (UPDATE)
Spectrum has sent 1 tech out and is sending another today (7/12/2018). The first tech and I are pretty sure it is an issue with their local network as they’ve had a lot of call in our area. But that hasn’t stopped me from developing UpCheck further. New features:
- More complete tweets, with target twitter accounts and hashtags set as environment variables
- A scheduling child-script that does daily reporting of outage totals
- A speed testing component – born of the desire to make sure I’m getting accurate average speed
- On the note of speed testing – UpCheck now has a client and a server docker. The client executes the speedtesting and hosts an XML file of the averages. The Server collects that data and reports in addition to the original function of tweeting about outages.
- MOAR SQLite DB’s!
- Shitty commenting. Worse wiki.
STEP (Last Update, I think) – 07/14/2018
I think I need to wrap this thing up by bugfixing, stabilizing, and pushing it out to be done. I’ve gone a bit overboard now with the features and included a setup that parses out the modem stats page from the client side during an outage.
However – my constant harassing of Spectrum has turned into working internet thanks to a tech that actually gave a shit. I’m pretty happy with Nathan. I’ll clean up the code, fix up the wiki, do a final push to the github repo in the next week or so. After that it is all maintenance, and hopefully very little of that.
I hope you enjoyed Project UpCheck.