feat(infra): add Prometheus and Chart.js dashboard with real-time charts
- Add Prometheus server scraping OTel collector - Add Chart.js donut chart for service health distribution - Add line charts for RPS, latency, error rate, trace volume - Add Prometheus API proxy to nginx whitelist - Restructure dashboard layout with 12-column responsive grid
This commit is contained in:
@@ -35,6 +35,27 @@ services:
|
||||
- PROMETHEUS_SERVER_URL=http://otel-collector:8889
|
||||
- LOG_LEVEL=info
|
||||
|
||||
# ── Prometheus (Metrics Backend) ──
|
||||
prometheus:
|
||||
container_name: prometheus
|
||||
image: prom/prometheus:latest
|
||||
restart: always
|
||||
networks:
|
||||
app-shared-net:
|
||||
aliases:
|
||||
- prometheus
|
||||
ports:
|
||||
- '9090:9090'
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
||||
- '--web.console.templates=/etc/prometheus/consoles'
|
||||
- '--web.enable-lifecycle'
|
||||
volumes:
|
||||
- ../../infra/otel/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- prometheus_data:/prometheus
|
||||
|
||||
# ── Custom Dashboard (nginx:alpine) ──
|
||||
dashboard:
|
||||
container_name: dashboard
|
||||
@@ -57,6 +78,9 @@ services:
|
||||
otel-collector:
|
||||
condition: service_started
|
||||
|
||||
volumes:
|
||||
prometheus_data:
|
||||
|
||||
networks:
|
||||
app-shared-net:
|
||||
name: app-shared-net
|
||||
|
||||
Reference in New Issue
Block a user