Server Monitoring with OpenClaw

TL;DR: Create health check prompts, set alert thresholds, schedule monitoring with cron, and receive alerts in your chat app.

Applies to: Windows, macOS, Linux
Audience: Power users, developers, security-conscious, enterprise
Last updated: 2026-02-23

power-user ops automation monitoring

Table of contents

  1. Create Health Checks
  2. Set Alert Thresholds
  3. Schedule Monitoring
  4. Monitor Services
  5. Example Configurations
  6. Next Steps
  7. FAQ

Create Health Checks

Create ~/.openclaw/workspace/prompts/server-health.md:

# Server Health Check
Check:
- Disk usage (alert if >85%)
- CPU usage (alert if >80% for 5 min)
- Memory usage (alert if >90%)
- Load average (alert if >2.0)
- Uptime

Report status and any issues found.

Set Alert Thresholds

Create ~/.openclaw/workspace/prompts/server-alerts.md:

# Server Alert Rules
Alert immediately if:
- Disk usage >85%
- Memory usage >90%
- Any critical service is down
- Load average >3.0

Send alerts to Slack and Telegram.

Schedule Monitoring

Add to ~/.openclaw/openclaw.json:

{
  "automation": {
    "cron": {
      "server-health": {
        "schedule": "*/5 * * * *",
        "prompt": "file:prompts/server-health.md",
        "target": "slack"
      },
      "server-alerts": {
        "schedule": "*/2 * * * *",
        "prompt": "file:prompts/server-alerts.md",
        "target": ["slack", "telegram"]
      }
    }
  }
}

Monitor Services

Create ~/.openclaw/workspace/prompts/service-check.md:

# Service Status Check
Check if these services are running:
- nginx (port 80/443)
- postgresql (port 5432)
- redis (port 6379)
- docker daemon

Restart any failed services and report.

Example Configurations

Disk Usage Alert

df -h | awk '$5+0 > 85 {print $1 " is " $5 " full"}'

CPU Monitoring

top -bn1 | grep "Cpu(s)" | awk '{print $2}' | cut -d'%' -f1

Memory Check

free -m | awk 'NR==2{printf "%.1f%%\n", $3*100/$2}'

Next Steps

FAQ

Q: Can OpenClaw restart services automatically?
A: Yes, but enable approvals for safety. Test in staging first.

Q: How do I monitor multiple servers?
A: Deploy OpenClaw on each server or use SSH to check remote servers.

Q: What about Windows servers?
A: Use PowerShell commands instead of Linux commands.

Q: Can it send alerts via email?
A: Yes. Configure email skills or use the message tool.

Recommended next

CI/CD Monitoring