API Health Checker
Monitor critical API endpoints for latency and error rates. Smart alerting.
Template
Every 5 minutes:
1. For each API endpoint in your watchlist:
a. Make a GET or HEAD request
b. Record: status code, response time (ms), response body (first 200 chars)
2. Alert conditions:
- Status != 200: immediate alert
- Response time > 2000ms: "Slow: {endpoint} took {time}ms"
- Response time > 5000ms: "Critical latency: {endpoint}"
3. Track rolling averages (15-min, 1-hour, 24-hour)
4. If error rate > 5% in a 15-min window: escalate alert
5. Daily: performance report with p50, p95, p99 latencies per endpoint
6. On recovery, send "API healthy again: {endpoint}, was down {duration}"Setup
- 1
Copy the HEARTBEAT.md content below into your OpenClaw workspace at `~/.openclaw/workspace/HEARTBEAT.md`.
- 2
Install the required skills: `clawhub install web_fetch`, `clawhub install message`.
- 3
Open your agent channel (Telegram or any connected channel) and send a message to confirm it's running.
- 4
Your agent will follow the schedule in HEARTBEAT.md automatically. Check back in 30 minutes to see it in action.
- 5
Customize the template: adjust timing, thresholds, and notification targets to fit your setup.
Tip: The template uses placeholder values like {your brand} or {repo}. Replace these with your actual values before saving.
Version History
Install commands
clawhub install web_fetch
clawhub install messageSkills required
File type
Defines scheduled tasks. Runs on a heartbeat interval.
Version
Updated Mar 8, 2025
You might also like
Uptime Monitor
Check your sites every 5 minutes. Alert on downtime.
~$0.10/day · ~3 min setup
API Cost Tracker
Monitor API usage and costs. Alert on spending spikes.
~$0.10/day · ~5 min setup
Security Scanner
Weekly security checks. SSL certs, exposed ports, dependency vulnerabilities.
~$0.05/day · ~10 min setup