HEARTBEAT.mdmonitoringv1.0

API Health Checker

Monitor critical API endpoints for latency and error rates. Smart alerting.

Setup time: ~5 min
Model: Haiku
Cost: ~$0.15/day Calculate your exact cost at Clawback
Last updated: Mar 8, 2025
byFullVibeAIcontributor

Template

HEARTBEAT.md
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. 1

    Copy the HEARTBEAT.md content below into your OpenClaw workspace at `~/.openclaw/workspace/HEARTBEAT.md`.

  2. 2

    Install the required skills: `clawhub install web_fetch`, `clawhub install message`.

  3. 3

    Open your agent channel (Telegram or any connected channel) and send a message to confirm it's running.

  4. 4

    Your agent will follow the schedule in HEARTBEAT.md automatically. Check back in 30 minutes to see it in action.

  5. 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

v1.0Initial releaseMar 8, 2025

Install commands

clawhub install web_fetch
clawhub install message

Skills required

Estimated cost

~$0.15/day

on Haiku model

Calculate your exact cost at Clawback

File type

HEARTBEAT.md

Defines scheduled tasks. Runs on a heartbeat interval.

Version

v1.0

Updated Mar 8, 2025

Contributor

FullVibeAI

Community submission

Spending too much?

Track and optimize your agent API costs.

Try Clawback →

You might also like