From e675bb60e73cc41b6f838b70d55ab9822405ebfa Mon Sep 17 00:00:00 2001 From: Lee Date: Sat, 28 Mar 2026 12:48:45 +0800 Subject: [PATCH] Stop normal heartbeat summaries in direct chat --- HEARTBEAT.md | 21 +++++++++++++++++++++ memory/2026-03-28.md | 4 ++++ 2 files changed, 25 insertions(+) create mode 100755 HEARTBEAT.md create mode 100644 memory/2026-03-28.md diff --git a/HEARTBEAT.md b/HEARTBEAT.md new file mode 100755 index 0000000..ad2b13b --- /dev/null +++ b/HEARTBEAT.md @@ -0,0 +1,21 @@ +# HEARTBEAT.md + +# 白天系统健康检查 +# 时区:Asia/Hong_Kong +# 目标:本机 +# 规则:08:30-23:00 每 30 分钟检查一次;若 CPU 或内存 > 80%,主动在当前聊天报警; +# 若无异常,则单聊内一律不发健康状态,只回复 HEARTBEAT_OK。 + +- Track in `memory/heartbeat-state.json`. +- On each heartbeat, if current local time is outside 08:30-23:00, reply HEARTBEAT_OK. +- If within window, inspect local system health for this machine. +- Collect and summarize: + - CPU usage percentage + - Memory usage percentage + - Disk usage for / + - Load average + - Uptime +- Alert condition: CPU > 80 OR Memory > 80. +- If alert condition is met, send a concise alert to this current chat/topic with the metrics. +- If no alert, reply HEARTBEAT_OK. Do not send normal health summaries in this direct chat; normal monitoring summaries are handled by the user's separate fixed monitoring script and OpenClaw cron/topic flow. +- After each check, update `memory/heartbeat-state.json` with the last check time. Only update `lastProactiveHealthSummary` when an actual alert is sent from heartbeat. diff --git a/memory/2026-03-28.md b/memory/2026-03-28.md new file mode 100644 index 0000000..6d71d1b --- /dev/null +++ b/memory/2026-03-28.md @@ -0,0 +1,4 @@ +# 2026-03-28 + +- 用户确认:已另有固定监控脚本和 OpenClaw cron 负责向群组 topic 发送服务器监控消息;当前 Telegram 单聊不应再接收常规健康状态。 +- 已调整 `HEARTBEAT.md`:本私聊 heartbeat 仅在 CPU > 80% 或内存 > 80% 时于当前聊天报警;无异常时统一回复 `HEARTBEAT_OK`,不再发送正常健康摘要。