zv3 / telegram-uptime-bot

AWS Lambda function to monitor a website's availability and alert a Telegram group channel when an outage is detected.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Purpose

This is an AWS Lambda function that can be used to monitor the availability of a single website by its URL and notify of any downtime to a Telegram channel via a Telegram Bot.

A CloudWatch event with a rate expression of 1 minute can be set up to run this function on a time interval.

Environment variables

  • URL The URL the function should periodically monitor for outages.

  • TELEGRAM_CHAT_ID The unique ID of the Telegram Bot.

  • TELEGRAM_TOKEN The authentication token to access the Telegram Bot that will be posting downtime notifications to the channel.

  • EXPECTED_TOKEN If set, the function will check the presence of the value within the page's HTML.

About

AWS Lambda function to monitor a website's availability and alert a Telegram group channel when an outage is detected.

License:Apache License 2.0


Languages

Language:JavaScript 100.0%