HEARTBEAT.mdmonitoringOpenclawv1.0.0

Log Anomaly Detector

Detects anomalies in application logs by tracking error rate patterns.

Setup time: ~10 min
Model: Sonnet
Cost: ~$0.20/day Calculate your exact cost at Clawback
Last updated: Mar 16, 2026
byRunbooks Communitycontributor

Template

HEARTBEAT.md
Every 15 minutes:
1. Fetch recent logs from your logging service API
2. Calculate current error rate (errors per minute)
3. Compare with baseline:
   - Same time yesterday
   - Same time last week
   - Rolling 24-hour average
4. Anomaly detection:
   - Error rate > 3x baseline: "Anomaly: error rate spike ({current}/min vs {baseline}/min avg)"
   - New error type not seen in 7 days: "New error type detected: {error_message}"
   - Error rate dropped to 0 (might mean logging is broken): "Warning: zero errors in 15 min, verify logging is working"
5. Group related errors by stack trace similarity
6. Hourly: error rate trend chart data
7. Daily: top errors by frequency, new vs recurring breakdown

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.

Install commands

Save the template to your OpenClaw workspace, then install the required skills.

# 1. Save the template
cp <download> ~/.openclaw/workspace/HEARTBEAT.md

# 2. Install skills
clawhub install web_fetch
clawhub install message

Version History

v1.0.0Initial releaseMar 16, 2026

Framework

Openclaw

Skills required

Estimated cost

~$0.20/day

on Sonnet model

Calculate your exact cost at Clawback

File type

HEARTBEAT.md

Defines scheduled tasks. Runs on a heartbeat interval.

Version

v1.0.0

Updated Mar 16, 2026

Contributor

Runbooks Community

Community submission

Spending too much?

Track and optimize your agent API costs.

Try Clawback →

You might also like