Grafana
Visualization and dashboarding platform for metrics, logs, and traces.
Overview
Grafana provides unified observability dashboards with SSO integration.
| Property | Value |
|---|---|
| Image | grafana/grafana:latest |
| Container | grafana |
| URL | grafana.ravenhelm.dev |
| Port | 3000 (internal) |
| Config | ~/ravenhelm/services/grafana/ |
| Data | PostgreSQL (grafana database) |
Authentication
Grafana uses Zitadel SSO:
- Login via "Sign in with Zitadel" button
- Admin users assigned via Zitadel groups
- Local admin account for emergency access
Data Sources
| Source | Type | URL |
|---|---|---|
| Prometheus | Metrics | http://prometheus:9090 |
| Loki | Logs | http://loki:3100 |
| Tempo | Traces | http://tempo:3200 |
| PostgreSQL | SQL | postgres:5432 |
Dashboards
Infrastructure
| Dashboard | ID | Purpose |
|---|---|---|
| Node Exporter | 1860 | Host system metrics |
| Docker | 893 | Container overview |
| Traefik | 17346 | Reverse proxy metrics |
Databases
| Dashboard | ID | Purpose |
|---|---|---|
| PostgreSQL | 9628 | Database performance |
| Redis | 763 | Cache statistics |
Quick Commands
# View logs
docker logs -f grafana
# Restart
docker restart grafana
# Reset admin password
docker exec grafana grafana-cli admin reset-admin-password <new-password>
Configuration
docker-compose.yml
services:
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: unless-stopped
environment:
- GF_DATABASE_TYPE=postgres
- GF_DATABASE_HOST=postgres:5432
- GF_SERVER_ROOT_URL=https://grafana.ravenhelm.dev
- GF_AUTH_GENERIC_OAUTH_ENABLED=true
- GF_AUTH_GENERIC_OAUTH_NAME=Zitadel
volumes:
- ../../data/grafana:/var/lib/grafana
- ./provisioning:/etc/grafana/provisioning:ro
networks:
- ravenhelm_net
Provisioning
Dashboards and datasources are provisioned from config files:
services/grafana/provisioning/
├── dashboards/
│ └── dashboards.yml
└── datasources/
└── datasources.yml
Troubleshooting
Issue: SSO Login Fails
Symptoms: Zitadel login redirects but doesn't complete
Diagnosis:
docker logs grafana 2>&1 | grep -i oauth
Solutions:
- Verify Client ID/Secret in
.env - Check redirect URI in Zitadel matches
- Verify
GF_SERVER_ROOT_URLis correct
Issue: Dashboard Not Loading
Symptoms: Dashboard shows "No data"
Diagnosis:
# Test data source
curl http://prometheus:9090/api/v1/query?query=up
Solutions:
- Check data source configuration
- Verify Prometheus is scraping targets
- Check time range selection