Serverless solution for freshping-telegram integration. Creates a telegram bot that notifies a group when the server status changes (Available/ Not Responding) that is hosted with AWS Lambda.
- Add @esm_wonderful_bot to the telegram group
- Get group chat ID by adding @getidsbot
- Go to Freshping > Setting > Integrations > Webhook
- Paste
https://irrb74more.execute-api.ap-southeast-1.amazonaws.com/dev/{chat_id}
(Example: If group chat ID is -100123456, pastehttps://irrb74more.execute-api.ap-southeast-1.amazonaws.com/dev/-100123456
)
- Ensure you have a Freshping account
- Create a Telegram Bot with @BotFather and save the bot token
- Ensure AWS credentials are set up on your computer for Serverless to work
- Clone this repo:
git clone https://github.com/yarkhinephyo/serverless-freshping-telegram.git
- Install Dependencies:
npm i
- Deploy the webhook:
sls deploy --botToken <Telegram bot token>
(URL will look like: https://xxxxxxxxxx.execute-api.ap-southeast-1.amazonaws.com/dev/{chat_id}) - Add webhook URL on Freshping Freshping > Setting > Integrations > Webhook Paste the URL while replacing {chat_id} with telegram group's chat id