Building a Free Uptime Monitor in Under 30 Minutes (No Paid Tools)
Описание и применение
Создайте бесплатный мониторинг доступности сайта за 30 минут, используя Python и GitHub Actions: скрипт проверяет URL, а GitHub Actions запускает его по расписанию и отправляет уведомления в Discord, Slack или Telegram.
Задача
Personal projects often require uptime monitoring, but paid tools charge per site and frequency, making them costly for simple checks.
Результат
A fully functional, zero‑cost uptime monitor that runs on GitHub Actions, alerts via popular chat platforms, and requires no dedicated server or paid service.
Рабочий процесс
- Create a new GitHub repository
- Add a Python script that sends an HTTP GET to the target URL, checks the status code, and posts a JSON payload to a webhook URL if the check fails
- Store the target URL and webhook URL in GitHub Secrets
- Create a .github/workflows/uptime.yml file with a schedule trigger (cron) and steps to set up Python, install dependencies, and run the script
- Test the workflow by forcing a failure and verifying the alert is received
- Adjust the cron interval as needed (5, 10, or 15 minutes)
Доказательства
Check if a site responds, on a schedule. If it doesn't respond, or the response code isn't in the 200 range, send an alert somewhere you'll actually see it — Discord, Slack, or Telegram all work fine with a webhook.
The webhook URL and any other secrets go into the repo's encrypted secrets, not into the script itself, so nothing sensitive ends up committed to the repository.
This isn't a replacement for a proper monitoring tool if you need historical uptime data, multi-region checks, or alerting that escalates through multiple channels if the first one doesn't get acknowledged.
- Дата записи: 2026-09-22T18:30:43.194Z