feat: complete agent monitoring - hook, UI, and backend filter
- Add event_type and framework filters to events query endpoint - Add /agents SPA route to web-ui server - Add Agents nav link and route in frontend - Add agents page CSS (timeline, VM pills, stats panel) - Build VM status strip, activity timeline, and real-time stats - Add agentmon hook for OpenClaw (HOOK.md + handler.ts) - Add docker-compose, Dockerfile, and supporting infra files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16
|
||||
container_name: agentmon-db
|
||||
environment:
|
||||
POSTGRES_PASSWORD: pass
|
||||
POSTGRES_DB: agentmon
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
- ./deploy/k8s/postgres.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
nats:
|
||||
image: nats:latest
|
||||
container_name: agentmon-nats
|
||||
ports:
|
||||
- "4222:4222"
|
||||
command: "--jetstream"
|
||||
volumes:
|
||||
- nats-data:/data
|
||||
|
||||
ingest-gateway:
|
||||
build: .
|
||||
container_name: agentmon-ingest
|
||||
command: ingest-gateway
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
nats:
|
||||
condition: service_started
|
||||
environment:
|
||||
AGENTMON_ADDR: :8080
|
||||
NATS_URL: nats://nats:4222
|
||||
NATS_TOPIC: agentmon.events.v1
|
||||
|
||||
query-api:
|
||||
build: .
|
||||
container_name: agentmon-query
|
||||
command: query-api
|
||||
ports:
|
||||
- "8081:8081"
|
||||
depends_on:
|
||||
nats:
|
||||
condition: service_started
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
AGENTMON_QUERY_ADDR: :8081
|
||||
DATABASE_URL: postgres://postgres:pass@postgres:5432/agentmon?sslmode=disable
|
||||
AGENTMON_QUERY_BASE: http://localhost:8081
|
||||
NATS_URL: nats://nats:4222
|
||||
NATS_TOPIC: agentmon.events.v1
|
||||
|
||||
web-ui:
|
||||
build: .
|
||||
container_name: agentmon-ui
|
||||
command: web-ui
|
||||
ports:
|
||||
- "8082:8082"
|
||||
depends_on:
|
||||
query-api:
|
||||
condition: service_started
|
||||
environment:
|
||||
AGENTMON_UI_ADDR: :8082
|
||||
AGENTMON_QUERY_BASE: http://query-api:8081
|
||||
|
||||
event-processor:
|
||||
build: .
|
||||
container_name: agentmon-processor
|
||||
command: event-processor
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
nats:
|
||||
condition: service_started
|
||||
environment:
|
||||
DATABASE_URL: postgres://postgres:pass@postgres:5432/agentmon?sslmode=disable
|
||||
NATS_URL: nats://nats:4222
|
||||
NATS_TOPIC: agentmon.events.v1
|
||||
|
||||
openclaw-monitor:
|
||||
build: .
|
||||
container_name: agentmon-openclaw-monitor
|
||||
command: openclaw-monitor
|
||||
network_mode: host
|
||||
depends_on:
|
||||
nats:
|
||||
condition: service_started
|
||||
environment:
|
||||
NATS_URL: nats://localhost:4222
|
||||
NATS_TOPIC: agentmon.events.v1
|
||||
OPENCLAW_REGISTRY: /openclaw-registry/openclaw-instances.json
|
||||
POLL_INTERVAL: 30s
|
||||
volumes:
|
||||
- /home/will/.claude/state/openclaw-instances.json:/openclaw-registry/openclaw-instances.json:ro
|
||||
- /var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock
|
||||
- /home/will/.ssh/id_rsa:/root/.ssh/id_rsa:ro
|
||||
- /home/will/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub:ro
|
||||
- /home/will/.ssh/authorized_keys:/root/.ssh/authorized_keys:ro
|
||||
- /var/lib/libvirt:/var/lib/libvirt:ro
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
nats-data:
|
||||
Reference in New Issue
Block a user