You can use this bot to track availability of a website (or keep Heroku from sleeping 😜).
The bot polls your favourite website at regular intervals to check the HTTP Status Code. Any change on the status code, for e.g.: 200 -> 500 or 502 -> 404, would be reported to you on your Telegram.
Try it now on: https://t.me/ManDownBot
Please also free to use this code base to run your own bot.
Do cargo run
cargo build --release
Add your Telegram bot token to the .env file and then
make dev
- You send a message
/track google.in
- The app checks for errors in the URL string
- If you specify the scheme it sticks to the scheme
- If you do not it adds both
http
andhttps
- If it is a fine URL then it looks up the HTTP status
- If it does not already exist in the tracked list it adds to the list
- The polling mechanism triggers the app at regular intervals. The FREQ variable in the .env file is the frequency in number of seconds.
- The app reads the db.csv and checks if the status of the website has changed.
- If the status has changed it sends a message to you.
- You send a message
/untrack google.in
- The app checks for errors in the URL string
- If you specify the scheme it sticks to the scheme
- If you do not it adds both
http
andhttps
- The app deletes the line from the csv file with your chat_id and site
- You send a message
/list
- The app replies with all the domains you are currently tracking
- You send a message
/clear
- The app clears all the domains you are currently tracking
I will be glad if you have suggestions on improvements or bug reports, please make issues out of them. I will be happier if you would contribute code.
- Fork it
- Clone develop:
git clone -b develop https://github.com/Donnie/ManDown
- Create your feature branch:
git checkout -b new-feature
- Make changes and add them:
git add .
- Commit:
git commit -m "Add some feature"
- Push:
git push origin new-feature
- Pull request
Feel free to raise issues when you have questions or you are stuck somewhere.