Home/Recipes/Website Uptime Monitoring with Telegram Alerts

Website Uptime Monitoring with Telegram Alerts

Developer ToolsBeginner5 minutes setup

Website Uptime Monitoring

Never lose customers to downtime. Get instant alerts when your site goes down.

What You'll Build

An uptime monitor that:

  • Pings websites/APIs every 1-5 minutes
  • Tracks response times and status codes
  • Sends instant Telegram alerts on failures
  • Generates monthly uptime reports

Requirements

  • Plugins: Web Search
  • Time: 5 minutes

Setup

1. Define Monitoring Targets

Monitor these URLs:
- https://myapp.com (every 1 minute)
- https://api.myapp.com/health (every 2 minutes)
- https://blog.myapp.com (every 5 minutes)

Expected: 200 status code, response time <3 seconds

2. Configure Alerts

Alert on Telegram if:
- Status code is not 200
- Response time >5 seconds
- Domain doesn't resolve
- SSL certificate expires in <7 days

Send:
- Instant alert on first failure
- Recovery notification when back online
- Summary if downtime >10 minutes

3. Set Up Recovery Actions

On failure:
1. Retry 3 times (30 seconds apart)
2. Check from multiple locations (avoid false positives)
3. If still down, send alert
4. Check DNS, SSL, and hosting status
5. Attempt to diagnose issue

4. Monthly Reports

First day of each month, send:
- Uptime % for each monitored URL
- Total downtime minutes
- Average response times
- Number of incidents
- Performance trends

Sample Alert

Downtime Alert:

🚨 DOWNTIME ALERT

URL: https://myapp.com
Status: 500 Internal Server Error
Response time: N/A
Last check: 2 minutes ago

🔍 Diagnosis:
- DNS: ✅ Resolving correctly
- SSL: ✅ Valid
- Server: 🔴 Returning 500 error

Possible causes:
- Application crash
- Database connection failure
- Memory/CPU overload

[View server logs →]

Recovery Alert:

✅ SITE RECOVERED

URL: https://myapp.com
Status: 200 OK
Response time: 1.2s
Downtime: 8 minutes

Root cause: Server restart resolved the issue.

[View incident report →]

Pro Tips

  1. Multi-Region: Check from 3+ geographic locations to avoid false positives
  2. Custom Health Checks: Use /health endpoints that check DB, Redis, etc.
  3. SSL Expiry: Auto-renew Let's Encrypt certs before they expire
  4. Status Page: Generate public status page for customers

Start monitoring → Launch Claws