Ethereumonarm HEARTBEAT.md

@EOA-Blockchain-LabsCoding1480Source

OpenClaw periodic heartbeat checklist from Ethereumonarm.

#bash#cat:devops#go#has-code#memory#open-claw
HEARTBEAT.md

This HEARTBEAT.md is the checklist an OpenClaw agent runs on a timer against an Ethereum node — the operational half of the Valkyrie setup, where SOUL.md holds the persona and safety rules and AGENTS.md holds the standing instructions. It reads like a runbook because that is what it is: seven numbered checks, each with the command that answers it, the threshold that counts as a problem, and the action to take when the threshold is crossed.

What makes it a good model is that it never assumes the environment. It opens with a pre-check that detects which execution and consensus clients are actually running by grepping the active systemd units against the full field of Ethereum clients, so the same file works on a Geth + Lighthouse box and a Nethermind + Teku one without editing. A note flags the one client whose peer-to-peer ports differ from everyone else's — precisely the sort of detail that turns a peer-connectivity investigation into an hour of confusion.

The checks it runs

  • Pre-check — detect the active execution, consensus, validator, and MEV-Boost services.
  • 1. Service status — everything detected should be active; restart what is not, with the validator explicitly excluded.
  • 2. Execution layer — sync state and peer count over local JSON-RPC.
  • 3. Consensus layer — the beacon node's health endpoint (with the meaning of each status code spelled out), peer count, and finality checkpoints.
  • 4. MEV-Boost — builder status, if that service is running.
  • 5. Resources — disk, memory, CPU load, and board temperature, each with a numeric alert level.
  • 6. Log analysis — scan the last fifteen minutes for a named set of failure keywords, with database corruption and invalid blocks escalating to stop-the-service.
  • 7. Validator duties — scan for missed or skipped duties, and never auto-restart the validator.
  • Alert format — a fixed template for reporting: severity, issue, service, details, action taken, next step.

What is worth borrowing

Every check carries its own threshold, so the agent is never asked to judge whether 87% disk usage is concerning. The two dangerous actions — restarting a validator, repairing a corrupt database — are both replaced with escalation, which is the right default when a mistake is expensive and irreversible. And the fixed alert template means a timer-driven agent produces output a human can scan in seconds, or a script can parse. Adapt the checks to your own service and the shape holds.

View HEARTBEAT.md at the source