prometheus-grafana-setuplisted
Install: claude install-skill WhiteMuush/Your-Claude-DevOps
# Setup Prometheus & Grafana
## Workflow en 5 étapes
### 1. Choisir la stratégie de déploiement
| Contexte | Option recommandée |
|---|---|
| Kubernetes | `kube-prometheus-stack` (Helm) |
| Docker Compose (dev/staging) | Compose multi-service |
| Bare metal / VM | Binaires + systemd |
| Grafana Cloud | Agent Alloy → cloud managed |
```bash
# Option Kubernetes (tout-en-un : Prometheus + Grafana + AlertManager + exporters)
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
helm install kube-prometheus prometheus-community/kube-prometheus-stack \
--namespace monitoring --create-namespace \
--set grafana.adminPassword=changeme \
--set prometheus.prometheusSpec.retention=15d
```
```yaml
# docker-compose.yml (dev)
services:
prometheus:
image: prom/prometheus:v3.13.0 # branche LTS
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- ./alerts:/etc/prometheus/alerts
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.retention.time=15d
ports: ["9090:9090"]
grafana:
image: grafana/grafana:13.2.0
environment:
GF_SECURITY_ADMIN_PASSWORD: changeme
volumes:
- grafana-data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
ports: ["3000:3000"]
alertmanager:
image: prom/alertmanager:v0.34.0
volumes:
- ./alertmanager.yml:/etc/alertmanager/alertmanager.yml
ports: ["9093:9093"]
volumes: