-
Notifications
You must be signed in to change notification settings - Fork 0
Home
UpCheck is actually two parts, called "UpCheck Server" and "UpCheck Client."
UpCheck-Server is designed to run on a cloud hosting provider. It runs checks on your uptime and will post to Twitter when you go down. It also collect speedtest and modem reports generated by UpCheck-Client.
UpCheck-Client is designed to run at your residence. It serves as the "witness" to see if your network is up according to UpCheck-Server. It will also generated periodic speedtesting and will scrape your modem config page, if you're using Spectrum, and provide that status to UpCheck-Server.
1 -- A cloud platform with Docker. I use Digital Ocean with Ubuntu, Docker, and Portainer installed. Do what makes you happy.
2 -- A docker install at home. I still use Ubuntu, Docker, Portainer. Use whatever works for you.
3 -- Routing/Port Forwarding set up at home so that the UpCheck-Client is accessible from the internet.
4 - A Twitter Account and Twitter App Keys
5 - Reasonable confidence that your own network isn't causing your network outages
I'd recommend you start up the client, validate it all works, and then create the server.
I suck at Python, so you have been warned.
Clone the upcheck repository
Go to /upcheck/upcheck-client:
cd ./upcheck/upcheck-client
Build the Container:
docker build -t upcheck-client .
Make a volume for upcheck to store the database:
docker volume create upcheckdb
Launch the Container
docker run -d --name="upcheck" \
-v upcheckdb:/upcheckdb
-e UPCHECK_DB_LOCATION=/upcheckdb/upcheck.db `
-e UPCHECK_URLTOCHECK=https://mycloudurl.com \
upcheck-client
Clone the upcheck repository
Go to /upcheck/upcheck-server:
cd ./upcheck/upcheck-server
Build the Container:
docker build -t upcheck .
Make a volume for upcheck to store the database:
docker volume create upcheckdb
Launch the Container
docker run -d --name="upcheck" \
-v upcheckdb:/upcheckdb
-e UPCHECK_URLTOCHECK=http://myhomeURL.example \
-e UPCHECK_TWITTER_CONSUMER_KEY=MyTwitterConsumerKey \
-e UPCHECK_TWITTER_CONSUMER_SECRET=MyTwitterConsumerSecret \
-e UPCHECK_TWITTER_ACCESS_TOKEN=MyTwitterAccessToken \
-e UPCHECK_TWITTER_ACCESS_TOKEN_SECRET=MyTwitterAccessTokenSecret \
-e UPCHECK_DB_LOCATION=/upcheckdb/upcheck.db `
-e UPCHECK_SPEEDTEST_RESULTS=http://myhomeURL.example/upcheck-speedtest.xml \
-e UPCHECK_TARGET_TWITTER_ACCOUNT=@blahblahblah @blahblahblah2 \
-e UPCHECK_HASHTAGS=#somehashtag #someotherhastag \
-e UPCHECK_MODEM_SCRAP_URL=http://myhomeURL.example/upcheck-speedtest.xml \
upcheck
UPCHECK_URLTOCHECK
This tell the UpCheck-Client which URL to use to verify if it has internet. This does NOT relate to posting to Twitter, but rather is used to trigger modem scraping.
UPCHECK_DB_LOCATION
UpCheck uses a SQLite Database on the client side to store speedtest data. This is because we don't want to post all the time what our speedtest numbers are, but rather take an average every day from the last 24 hours. This gives a better feel for overall performance. This specifies the location of the database and it should be "/upcheckdb/upcheck.db"
UPCHECK_URLTOCHECK
On the Server side of this, UpCheck uses this as the target to verify connectivity. This IS WHAT TRIGGERS TWITTER alerts and other tasks. Make sure this URL works well before you turn on the Server-side of UpCheck.
UPCHECK_TWITTER_CONSUMER_KEY
UPCHECK_TWITTER_CONSUMER_SECRET
UPCHECK_TWITTER_ACCESS_TOKEN
UPCHECK_TWITTER_ACCESS_TOKEN_SECRET
You get these from setting up your Twitter Apps. Self-Explanatory what should go where. Do not wrap in quotes.
UPCHECK_DB_LOCATION
UpCheck uses a SQLite database on the server side to track outage times a and frequencies. It also uses it to determine the length of any given outage. This specifies the location of the database and it should be "/upcheckdb/upcheck.db"
UPCHECK_TARGET_TWITTER_ACCOUNT
This is the Twitter Account that will be targeted by your Tweets. I suggest you use your ISP. You can enter more than one Twitter Account. Format is "@Target1 @Target2 @Target3" etc. Do not wrap in quotes.
UPCHECK_HASHTAGS
This sets the hashtags to include when posting. It is simply a text field, so put whatever you want here to go after your tweets. Do not wrap in quotes.
UPCHECK_MODEM_SCRAPE_URL
This specifies the URL that UpCheck-Server will check after an outage for a scrape collection from your modem stats. This is optional. The format should be "http://myhomeURL.example/upcheck-modem.txt"