feat: add agentmon monitoring hook for OpenClaw telemetry

Add hook handler that forwards OpenClaw agent events to the agentmon
ingest endpoint for monitoring and observability.

- ansible/playbooks/files/agentmon-hook/: Ansible-deployable hook
- openclaw/hooks/agentmon/: Hook installed in OpenClaw instance

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
William Valentin
2026-03-19 15:35:47 -07:00
parent c235b04fc3
commit 0215c037da
5 changed files with 1134 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
---
name: agentmon
description: "Emit OpenClaw telemetry events to the agentmon monitoring pipeline"
metadata:
openclaw:
events:
- "command:new"
- "command:stop"
- "command:reset"
- "message:received"
- "message:sent"
- "agent:bootstrap"
export: "default"
---
# Agentmon Telemetry Hook
Captures OpenClaw agent activity and emits it as `agentmon.event` envelopes to
the agentmon ingest gateway.
## Configuration
Set the ingest gateway URL before enabling the hook:
```bash
export AGENTMON_INGEST_URL=http://192.168.122.1:8080
```
You can optionally override the VM identifier:
```bash
export AGENTMON_VM_NAME=zap
```