https://github.com/art1415926535/service_status_bot_lambda
Check running HTTP services
https://github.com/art1415926535/service_status_bot_lambda
bot lambda-functions telegram-bot
Last synced: 9 months ago
JSON representation
Check running HTTP services
- Host: GitHub
- URL: https://github.com/art1415926535/service_status_bot_lambda
- Owner: art1415926535
- Created: 2018-11-15T15:54:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-22T08:57:31.000Z (over 7 years ago)
- Last Synced: 2025-01-21T21:33:00.451Z (over 1 year ago)
- Topics: bot, lambda-functions, telegram-bot
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Service status bot for AWS Lambda
Bot:
```
✅✅
20:00:00 11.11.18
200 https://google.com
200 https://api.github.com
```
## Config
Runtime: Python 3.6
Handler: `main.handler`
### Environment variables
* `urls` _required_: URLs that the bot will check.
* `token` _required_: Bot token.
* `message_id` _required_: Updateable message.
* `chat_id` _required_: Chat id with message.
* `timeout`: Request time out.
* `tz`: Time zone.
#### Example
* `urls`: `https://google.com,https://www.mozilla.org`
* `token`: `95123483458:AAAz65W9-bghuiacsYUnbghuiMNjkMhuio`
* `message_id`: `7`
* `timeout`: `-1000000000000`
* `timeout`: `10`.
* `tz`: `Europe/Moscow`
## To create a deployment package
1. Create a virtual environment.
```bash
virtualenv ~/shrink_venv
source ~/shrink_venv/bin/activate
```
1. Install libraries in the virtual environment
```bash
pip install -r requirements.txt
```
1. Add the contents of lib and lib64 site-packages to your .zip file.
```bash
cd $VIRTUAL_ENV/lib/python3.6/site-packages
zip -r9 ~/service_status_bot_lambda.zip .
```
1. Add your python code to the .zip file
```bash
cd ~
zip -g service_status_bot_lambda.zip main.py
zip -g service_status_bot_lambda.zip checker.py
```