← 返回
未分类 中文

Site Health Monitor

Monitor websites for uptime, SSL certificate expiry, response time, HTTP errors, and content changes. Generate health reports and send alerts when issues are...
监控网站可用性、SSL证书到期、响应时间、HTTP错误和内容变更,生成健康报告并在检测到问题时发送告警。
charlie-morrison
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 430
下载
💾 1
安装
1
版本
#latest

概述

Site Health Monitor

Monitor one or more websites for health issues. Detect downtime, expiring SSL certs, slow responses, and content changes — then report or alert.

Quick Check (Single URL)

When user asks to check a single URL right now:

  1. Run scripts/check_site.sh
  2. Parse the JSON output
  3. Present a formatted health report

Monitored Sites Config

For ongoing monitoring, maintain a config at user's chosen location (default: ~/.openclaw/workspace/site-monitor.json):

{
  "sites": [
    {
      "url": "https://example.com",
      "name": "Main Site",
      "checks": ["uptime", "ssl", "response_time", "content"],
      "alert_threshold_ms": 3000,
      "ssl_warn_days": 14,
      "content_selector": "title"
    }
  ],
  "defaults": {
    "checks": ["uptime", "ssl", "response_time"],
    "alert_threshold_ms": 5000,
    "ssl_warn_days": 30
  }
}

Health Checks

1. Uptime

  • HTTP GET to URL
  • Pass: 2xx/3xx status
  • Warning: 4xx status
  • Fail: 5xx, connection refused, timeout (>10s)

2. SSL Certificate

  • Run scripts/check_ssl.sh
  • Pass: Valid, >30 days to expiry
  • Warning: <30 days to expiry (configurable)
  • Fail: Expired, self-signed, or missing

3. Response Time

  • Measure TTFB + transfer via scripts/check_site.sh
  • Pass: Under threshold (default 5000ms)
  • Warning: 1-2x threshold
  • Fail: >2x threshold or timeout

4. Content Changes (Planned)

  • Fetch page, extract text, hash it
  • Compare against stored hash
  • Report if content changed since last check
  • Note: This feature is planned for v1.1

Reports

Single Site

## 🟢 example.com — Healthy
| Check         | Status | Detail                    |
|---------------|--------|---------------------------|
| Uptime        | ✅ UP  | 200 OK (143ms)            |
| SSL           | ✅ OK  | Expires in 87 days        |
| Response Time | ✅ OK  | 342ms (threshold: 5000ms) |
| Content       | — Same | No changes detected       |

Multi-Site Summary

## Site Health — 2026-03-26
| Site       | Status | Issues         |
|------------|--------|----------------|
| example.com| 🟢 OK | —              |
| api.foo.io | 🟡 WARN| SSL: 12 days  |
| shop.bar   | 🔴 DOWN| 503 error     |

Alerts

Alert when: site DOWN, SSL within warning window, response >2x threshold, 2+ consecutive failures.

Format: ⚠️ [site] — [issue]. [detail]. Checked at [time].

Scheduled Monitoring

Suggest cron job for recurring checks (30-60 min interval for production). Store last 100 results per site in ~/.openclaw/workspace/.site-monitor-history.json.

Scripts

  • scripts/check_site.sh — HTTP health check, outputs JSON (status, timing, headers)
  • scripts/check_ssl.sh — SSL cert check, outputs JSON (issuer, expiry, days remaining)

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-03 09:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Pyproject Toml Validator

charlie-morrison
依据 PEP 517/621 规则校验 pyproject.toml 文件,验证项目元数据、构建系统和工具配置,并提供详细报告。
★ 0 📥 458

Devcontainer Validator

charlie-morrison
在 VS Code 开发容器中验证 devcontainer.json 的语法、结构、功能、端口、生命周期脚本、定制项及安全最佳实践。
★ 0 📥 452

Env Config Validator

charlie-morrison
校验 .env 文件,匹配 schema,比较环境(dev 与 prod),检测尾部空格、占位符、无效端口、缺失 protoc 等常见错误
★ 0 📥 448