← 返回
开发者工具 Key 中文

Device Heartbeat Monitor

Monitor remote device online status via heartbeat pings to healthchecks.io. Use when user asks to check if a device is online or offline, user reports device...
通过 healthchecks.io 心跳包监控远程设备在线状态。当用户询问设备是否在线/离线或报告设备...时使用。
houziershi
开发者工具 clawhub v1.0.0 1 版本 99835 Key: 需要
★ 0
Stars
📥 605
下载
💾 7
安装
1
版本
#latest

概述

Device Heartbeat Monitor

Monitor device online status using heartbeat pings to healthchecks.io (free tier).

Architecture

Device → every N min → curl GET → healthchecks.io → missed? → alert user
User asks "device online?" → agent reads state file or queries API → answer

Security Warning

Never share the full ping URL (https://hc-ping.com/UUID) in any chat message. Messaging platforms (Feishu, Slack, etc.) auto-fetch URLs for link previews, which creates false heartbeat pings. Only pass the UUID portion separately.

Quick Commands

Check local status (no API key needed):

bash scripts/status.sh

View recent logs:

tail -20 ~/.openclaw/logs/heartbeat.log

Read state file directly:

cat ~/.openclaw/logs/heartbeat-state.json

Setup

1. Create a Check on healthchecks.io

Register at https://healthchecks.io, create a Check. Set Period = 3 min, Grace = 5 min. See references/healthchecks-setup.md for details.

2. Install heartbeat service

bash scripts/setup.sh "https://hc-ping.com/UUID" 180
  • Arg 1: Full ping URL
  • Arg 2: Interval in seconds (default 180 = 3 min)
  • Installs as macOS LaunchAgent (auto-start on boot, auto-restart on crash)
  • Low priority background process, minimal CPU/battery

3. Verify

bash scripts/status.sh

Remote Status Check (from another device)

bash scripts/check.sh "READONLY_API_KEY" "CHECK_UUID"

Response fields: status (up/down/grace), last_ping (timestamp).

Multi-Device Setup

Create a separate Check per device on healthchecks.io. Each device gets its own UUID. Run setup.sh on each device with its unique URL.

Uninstall

bash scripts/uninstall.sh

Features

  • Log rotation: Auto-truncates at 500 lines
  • State file: ~/.openclaw/logs/heartbeat-state.json for quick local queries
  • Recovery detection: Logs "RECOVERED after N failures" on reconnect
  • Fail counter: Tracks consecutive failures in state file

Troubleshooting

  • Service not running: bash scripts/setup.sh "URL" 180 to reinstall
  • Ping failing: Check network; verify URL with curl -v "URL"
  • Logs: ~/.openclaw/logs/heartbeat.log and heartbeat-error.log
  • False pings from chat platforms: Regenerate UUID, never share full URL in chat

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-19 22:02 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Agent Browser

matrixy
专为AI智能体优化的无头浏览器自动化CLI,支持无障碍树快照和基于引用的元素选择。
★ 427 📥 118,343
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,390
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,429