Website monitor telegram bot
What is it?
I am your private bot for web page monitoring. I can check the status of any web page for you. I can also follow a list of URLs and notify you when their status changes.
I am designed to be private. I will only respond to the messages I receive within the chat that you have configured for me.
Available commands
Command | Description | Parameters |
---|---|---|
/help | Display bot usage info | - |
/check | Check the status of a URL or a list of URLs | A URL or a list of URLs separated by a space |
/add | Add a URL or a list of URLs to the tracking list | A URL or a list of URLs separated by a space |
/remove | Remove a URL or a list of URLs from the tracking list | A URL or a list of URLs separated by a space |
/list | Display the tracking list | - |
/report | Display a report of the tracked URLs | - |
Usage
Local
- Copy default.env to .env
cp default.env .env
-
Create a new PostgreSQL database and set the URL in the .env file.
-
Configure the telegram variables.
-
TELEGRAM_TOKEN. Write to @BotFather to create a new bot and get its unique token.
-
TELEGRAM_TO. Find out how to get a chat id here.
-
-
[Optional] Asign the frequency of the check and report tasks. By default the following values are used:
-
Every minute for the check task.
-
At 10 p.m. for the report task.
Crontab guru is a great tool for generating crontab schedule expressions.
-
-
[Optional] Set the timezone in the .env file to set the task time correctly.
-
[Optional] I18n.
-
Duplicate /locales/en.json with the new language code.
-
Edit the translations respecting the texts in braces.
-
Write the new language code in the .env file...
-
Deploying to Heroku
Heroku is a great hosting for this bot as it provides everything you need for free. To carry out the deployment of the project you will need to:
-
Push the code to a Github repository.
-
Connect your Heroku and GitHub accounts.
-
Create a new Heroku app and select GitHub as the deployment method. Choose main branch. Enable Automatic Deploys if you wish.
-
Add a free Heroku Postgres add-on to the app.
-
In the Resources section change the Dyno type from web to worker.
-
Create the missing environment variables in the Settings section.
Contributing
Please make sure to read the Contributing Guide to learn about our submission process, coding rules and more.
Help us keep Angular open and inclusive. Please read and follow our Code of Conduct.
Supporting
If you are considering supporting the project, you could buy the developer a coffee.