── GENERATED OUTPUT ──
Monitoring
Prometheus + Grafana monitoring stack with pre-built dashboards and alert rules.
## Generation
bash
exo gen monitoring## Generated Files
text
monitoring/├── prometheus.yml # Scrape configuration└── docker-compose.monitoring.yml # Prometheus + Grafana stackgrafana_dashboard.json # Pre-built dashboardalerts.yml # Prometheus alert rules## Prometheus Config
monitoring/prometheus.yml
1global:2 scrape_interval: 15s34scrape_configs:5 - job_name: 'my-service'6 static_configs:7 - targets: ['host.docker.internal:8080']## Docker Compose
monitoring/docker-compose.monitoring.yml
1version: '3.8'2services:3 prometheus:4 image: prom/prometheus:latest5 volumes:6 - ./prometheus.yml:/etc/prometheus/prometheus.yml7 ports:8 - "9090:9090"910 grafana:11 image: grafana/grafana:latest12 ports:13 - "3000:3000"14 environment:15 - GF_SECURITY_ADMIN_PASSWORD=admin## Alert Rules
alerts.yml
1groups:2 - name: my-service-alerts3 rules:4 - alert: HighErrorRate5 expr: rate(http_requests_total{status=~"5.."}[5m]) > 0.16 for: 5m7 labels:8 severity: critical9 annotations:10 summary: "High error rate detected"1112 - alert: HighLatency13 expr: histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m])) > 0.514 for: 5m15 labels:16 severity: warning## Usage
bash
# Start monitoring stackdocker-compose -f monitoring/docker-compose.monitoring.yml up -d# Access# Prometheus: http://localhost:9090# Grafana: http://localhost:3000 (admin/admin)