Files
bot/docs/gateway/health.md
zeekay 4bdc9ee3e4 chore: rebrand openclaw → hanzo-bot for bridge merge
Comprehensive rename of all openclaw references to hanzo-bot equivalents:
- Package: openclaw → @hanzo/bot
- Binary: openclaw → hanzo-bot
- Types: OpenClaw* → Bot*
- Env vars: OPENCLAW_* → BOT_*
- Android: ai.openclaw.android → ai.hanzo.bot.android
- iOS/macOS: ai.openclaw.* → ai.hanzo.*
- Swift modules: OpenClaw* → Bot*
- Plugins: openclaw.plugin.json → bot.plugin.json
- Paths: .openclaw/ → .hanzo/bot/
- URLs: github.com/openclaw → github.com/hanzoai
2026-02-26 22:36:01 -08:00

2.3 KiB
Raw Permalink Blame History

summary, read_when, title
summary read_when title
Health check steps for channel connectivity
Diagnosing WhatsApp channel health
Health Checks

Health Checks (CLI)

Short guide to verify channel connectivity without guessing.

Quick checks

  • hanzo-bot status — local summary: gateway reachability/mode, update hint, linked channel auth age, sessions + recent activity.
  • hanzo-bot status --all — full local diagnosis (read-only, color, safe to paste for debugging).
  • hanzo-bot status --deep — also probes the running Gateway (per-channel probes when supported).
  • hanzo-bot health --json — asks the running Gateway for a full health snapshot (WS-only; no direct Baileys socket).
  • Send /status as a standalone message in WhatsApp/WebChat to get a status reply without invoking the agent.
  • Logs: tail /tmp/bot/bot-*.log and filter for web-heartbeat, web-reconnect, web-auto-reply, web-inbound.

Deep diagnostics

  • Creds on disk: ls -l ~/.hanzo/bot/credentials/whatsapp/<accountId>/creds.json (mtime should be recent).
  • Session store: ls -l ~/.hanzo/bot/agents/<agentId>/sessions/sessions.json (path can be overridden in config). Count and recent recipients are surfaced via status.
  • Relink flow: hanzo-bot channels logout && hanzo-bot channels login --verbose when status codes 409–515 or loggedOut appear in logs. (Note: the QR login flow auto-restarts once for status 515 after pairing.)

When something fails

  • logged out or status 409–515 → relink with hanzo-bot channels logout then hanzo-bot channels login.
  • Gateway unreachable → start it: hanzo-bot gateway --port 18789 (use --force if the port is busy).
  • No inbound messages → confirm linked phone is online and the sender is allowed (channels.whatsapp.allowFrom); for group chats, ensure allowlist + mention rules match (channels.whatsapp.groups, agents.list[].groupChat.mentionPatterns).

Dedicated "health" command

hanzo-bot health --json asks the running Gateway for its health snapshot (no direct channel sockets from the CLI). It reports linked creds/auth age when available, per-channel probe summaries, session-store summary, and a probe duration. It exits non-zero if the Gateway is unreachable or the probe fails/timeouts. Use --timeout <ms> to override the 10s default.