Automated LGTM + Alloy observability stack deployment using Docker Compose. Use when setting up Claude Code observability infrastructure locally.
59
68%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.claude/skills/observability-stack-setup/SKILL.mdThe canonical home for this skill is observability-stack-setup in fernandezbaptiste/Skrillz
Automated deployment of the complete LGTM (Loki, Grafana, Tempo, Mimir/Prometheus) + Alloy observability stack for Claude Code monitoring.
Automatically deploys and configures:
# Verify Docker installed
docker --version # Requires ≥ 20.10
# Verify Docker Compose installed
docker compose version # Requires ≥ 2.0Invoke this skill and it will:
.observability/ directory structuredocker compose up -dEstimated time: 5-10 minutes
| Service | Port | Purpose |
|---|---|---|
| Grafana | 3000 | Dashboards and visualization |
| Grafana Alloy | 4317 (gRPC), 4318 (HTTP), 12345 (metrics) | OTLP receiver |
| Loki | 3100 | Log storage and querying |
| Tempo | 3200 | Trace storage and querying |
| Prometheus | 9090 | Metrics storage and querying |
All data persisted in .observability/volumes/:
alloy-data/ - Alloy configuration and stateloki-data/ - Log storagetempo-data/ - Trace storageprometheus-data/ - Metrics storagegrafana-data/ - Dashboards, datasources, settingsClaude Code Overview
Tool Performance Matrix
Cost Analysis
Error Tracking
Session Analysis
Checks Docker and Docker Compose installed with compatible versions.
.observability/
├── docker-compose.yml # Main stack definition
├── alloy/
│ └── config.yaml # OTLP receiver + exporters config
├── grafana/
│ ├── datasources/
│ │ ├── loki.yml # Loki datasource
│ │ ├── prometheus.yml # Prometheus datasource
│ │ └── tempo.yml # Tempo datasource
│ └── dashboards/
│ ├── claude-code-overview.json
│ ├── tool-performance.json
│ ├── cost-analysis.json
│ ├── error-tracking.json
│ └── session-analysis.json
└── volumes/ # Persistent data
├── alloy/
├── loki/
├── tempo/
├── prometheus/
└── grafana/Creates all configuration files from templates (see references/ for details).
docker compose -f .observability/docker-compose.yml up -dVerifies each service:
http://localhost:12345/metricshttp://localhost:3100/readyhttp://localhost:3200/readyhttp://localhost:9090/-/healthyhttp://localhost:3000/api/healthUses Grafana API to import all pre-built dashboards.
Displays:
Receives telemetry from Claude Code via OTLP protocol:
localhost:4317localhost:4318Routes telemetry to backends:
Default: 365 days (configurable in docker-compose.yml)
-ingester.max-chunk-age=365d)-storage.trace.local.path retention)--storage.tsdb.retention.time=365d)Full logging enabled (no redactions):
This configuration assumes observability for personal use with full data access.
If ports 3000, 3100, 3200, 4317, 4318, 9090, or 12345 are in use:
Option 1: Stop conflicting services
# Find process using port
sudo lsof -i :3000
# Stop the process
sudo kill <PID>Option 2: Modify ports in docker-compose.yml
Check logs:
docker compose -f .observability/docker-compose.yml logs [service_name]Common issues:
df -h)Manually import:
# Copy dashboard JSON to container
docker cp .observability/grafana/dashboards/claude-code-overview.json \
observability-grafana-1:/tmp/
# Import via API
curl -X POST http://localhost:3000/api/dashboards/db \
-H "Content-Type: application/json" \
-u admin:admin \
-d @.observability/grafana/dashboards/claude-code-overview.jsonAfter stack is running:
claude-code-telemetry-enable skillGraceful shutdown (preserves data):
docker compose -f .observability/docker-compose.yml downComplete removal (deletes data):
docker compose -f .observability/docker-compose.yml down -vreferences/docker-compose-full.yml - Complete Docker Compose configurationreferences/alloy-config.yaml - Grafana Alloy OTLP receiver configurationreferences/grafana-datasources/ - Datasource YAML configurationsreferences/dashboards/ - Pre-built dashboard JSON filesreferences/troubleshooting.md - Common issues and solutionsscripts/setup-stack.sh - Main setup script (automated deployment)scripts/verify-health.sh - Health check all servicesscripts/import-dashboards.sh - Import Grafana dashboardsComponent Versions (latest as of 2025-11-22):
All versions pinned in docker-compose.yml for reproducibility.
93ed392
Canonical home
since Sep 12, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.