Clawker includes an optional monitoring stack that collects telemetry from Claude Code agents running in containers. It provides real-time dashboards for metrics and logs — giving you visibility into what every agent is doing, how much it costs, what tools it’s calling, and whether it’s making progress.Documentation Index
Fetch the complete documentation index at: https://docs.clawker.dev/llms.txt
Use this file to discover all available pages before exploring further.

What You Get
The pre-built Grafana dashboard gives you per-agent and per-project visibility into:- Cost and token usage — API call costs, input/output tokens, rate limiting
- Coding activity — file edits, tool invocations, command executions
- Tool usage — which tools the agent calls, how often, and how long they take
- Session detail — full event timeline for individual agent sessions





Architecture
The monitoring stack runs as six Docker Compose services on theclawker-net network:
Services
| Service | Image | Default Port | Purpose |
|---|---|---|---|
| OTEL Collector | otel/opentelemetry-collector-contrib | 4318 (HTTP), 4317 (gRPC) | Receives telemetry from agents and routes it to storage backends |
| Prometheus | prom/prometheus | 9090 | Time-series metrics storage — resource utilization, request counts, durations |
| Loki | grafana/loki | 3100 | Log aggregation — structured events with tool details, prompts, decisions |
| Jaeger | jaegertracing/all-in-one | 16686 | Distributed tracing — collector pipeline is configured but agents don’t emit traces yet |
| Grafana | grafana/grafana | 3000 | Unified dashboards — pre-configured with all data sources and a Claude Code dashboard |
| Promtail | grafana/promtail | 9080 | Collects firewall container logs (Envoy + CoreDNS) via Docker socket and ships to Loki |
clawker-net network. Grafana starts with anonymous login enabled (no credentials required) and data sources pre-provisioned.
How Agents Connect
OTEL endpoints are baked into every Clawker image at build time. At container creation, Clawker checks whether the monitoring stack is running and conditionally enables telemetry:OTEL_EXPORTER_OTLP_METRICS_ENDPOINT— points to the collector’s metrics endpoint (baked into image)OTEL_EXPORTER_OTLP_LOGS_ENDPOINT— points to the collector’s logs endpoint (baked into image)CLAUDE_CODE_ENABLE_TELEMETRY— set to1when theotel-collectorcontainer is detected as running onclawker-net, set to0otherwiseOTEL_RESOURCE_ATTRIBUTES— tags withproject=andagent=for filtering
agent.env in your .clawker.yaml even when the stack is down, but Claude Code won’t retry failed collector connections.
Start the monitoring stack before starting your agents to ensure telemetry is captured.
Egress Traffic Visibility
When the firewall is enabled, the dashboard includes an Egress Traffic row at the bottom with real-time visibility into network activity:- Envoy Traffic — streaming log of all outbound connections through the proxy, showing domain, protocol, HTTP method/path (for inspected traffic), response codes, and response flags
- DNS Lookups — streaming log of all DNS queries through CoreDNS, showing queried domain, query type, response code (NOERROR for allowed, NXDOMAIN for blocked), and resolution time
- Top Blocked Domains — table of the most frequently blocked domains (denied by Envoy or NXDOMAIN from CoreDNS)
- Egress Over Time — time series of outbound request volume by protocol type
clawker monitor init generates the Promtail configuration automatically.
Setup
1. Initialize Configuration
~/.local/share/clawker/monitor/):
compose.yaml— Docker Compose definition for all six servicesotel-config.yaml— OpenTelemetry Collector pipeline configurationprometheus.yaml— Prometheus scrape targetsgrafana-datasources.yaml— Auto-provisioned Grafana data sourcesgrafana-dashboards.yaml— Dashboard provisioning configgrafana-dashboard.json— Pre-built Claude Code dashboardpromtail-config.yaml— Promtail configuration for firewall log collection
--force to regenerate files if they already exist.
2. Start the Stack
3. Run Agents
Start agents as usual — telemetry flows automatically:4. View Dashboards
Open Grafana athttp://localhost:3000. The pre-configured Claude Code dashboard shows metrics and logs with per-project and per-agent filtering.
Telemetry Controls
Fine-tune what telemetry is collected viasettings.yaml:
Port Configuration
Override default ports insettings.yaml if they conflict with other services:
Checking Status
Teardown
--volumes, monitoring data persists across restarts. The clawker-net network is preserved for other Clawker services (firewall, agents).