mirror of
https://github.com/luxfi/monitoring.git
synced 2026-10-30 15:24:48 +00:00
136 lines
4.1 KiB
YAML
136 lines
4.1 KiB
YAML
version: '3.8'
|
|
|
|
# DEX Extension for Lux Monitoring Stack
|
|
# This file extends the main monitoring stack with DEX-specific services
|
|
|
|
services:
|
|
# Extend Prometheus with DEX scrape configs
|
|
prometheus:
|
|
volumes:
|
|
- ./prometheus/dex-prometheus.yml:/etc/prometheus/dex-prometheus.yml:ro
|
|
- ./prometheus/dex-rules.yml:/etc/prometheus/dex-rules.yml:ro
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--config.file=/etc/prometheus/dex-prometheus.yml' # Add DEX config
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
|
|
- '--web.console.templates=/usr/share/prometheus/consoles'
|
|
- '--web.enable-lifecycle'
|
|
- '--storage.tsdb.retention.time=30d'
|
|
|
|
# Extend Grafana with DEX dashboards
|
|
grafana:
|
|
volumes:
|
|
- ./grafana/dashboards/dex:/var/lib/grafana/dashboards/dex:ro
|
|
environment:
|
|
- GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource,grafana-piechart-panel,grafana-worldmap-panel
|
|
|
|
# DEX-specific exporters
|
|
dex-exporter:
|
|
image: prom/node-exporter:latest
|
|
container_name: lux-dex-exporter
|
|
restart: unless-stopped
|
|
ports:
|
|
- "9101:9100"
|
|
volumes:
|
|
- /proc:/host/proc:ro
|
|
- /sys:/host/sys:ro
|
|
- /:/rootfs:ro
|
|
command:
|
|
- '--path.procfs=/host/proc'
|
|
- '--path.sysfs=/host/sys'
|
|
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
|
|
- '--collector.netdev.device-exclude=^(veth.*|docker.*|br-.*)$$'
|
|
- '--collector.diskstats.device-exclude=^(ram|loop|fd)\\d+$$'
|
|
networks:
|
|
- lux-monitoring
|
|
- dex-network
|
|
labels:
|
|
component: "dex"
|
|
chain: "x-chain"
|
|
|
|
# Custom DEX metrics aggregator
|
|
dex-metrics-aggregator:
|
|
image: alpine:latest
|
|
container_name: lux-dex-metrics
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./scripts/dex-metrics.sh:/usr/local/bin/dex-metrics.sh:ro
|
|
command: >
|
|
sh -c "
|
|
apk add --no-cache curl jq &&
|
|
while true; do
|
|
# Collect DEX metrics from various endpoints
|
|
curl -s http://lux-dex-node:8080/metrics > /tmp/dex-metrics.txt
|
|
curl -s http://lux-dex-node:8080/consensus/metrics >> /tmp/dex-metrics.txt
|
|
curl -s http://lux-dex-node:8080/metrics/hft >> /tmp/dex-metrics.txt
|
|
|
|
# Parse and format for Prometheus
|
|
cat /tmp/dex-metrics.txt | grep -E '^dex_' > /metrics/dex.prom
|
|
|
|
sleep 10
|
|
done
|
|
"
|
|
networks:
|
|
- lux-monitoring
|
|
- dex-network
|
|
|
|
# Vector for high-performance log aggregation
|
|
vector:
|
|
image: timberio/vector:latest-alpine
|
|
container_name: lux-dex-vector
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8686:8686" # Vector API
|
|
volumes:
|
|
- ./vector/vector.toml:/etc/vector/vector.toml:ro
|
|
- /var/log:/var/log:ro
|
|
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
|
command: ["--config", "/etc/vector/vector.toml"]
|
|
networks:
|
|
- lux-monitoring
|
|
- dex-network
|
|
|
|
# Jaeger for distributed tracing
|
|
jaeger:
|
|
image: jaegertracing/all-in-one:latest
|
|
container_name: lux-dex-jaeger
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5775:5775/udp" # Zipkin compact
|
|
- "6831:6831/udp" # Jaeger compact
|
|
- "6832:6832/udp" # Jaeger binary
|
|
- "5778:5778" # Config
|
|
- "16686:16686" # Jaeger UI
|
|
- "14268:14268" # Jaeger collector
|
|
- "14250:14250" # gRPC
|
|
environment:
|
|
- COLLECTOR_ZIPKIN_HOST_PORT=:9411
|
|
- COLLECTOR_OTLP_ENABLED=true
|
|
networks:
|
|
- lux-monitoring
|
|
- dex-network
|
|
|
|
# cAdvisor for container metrics
|
|
cadvisor:
|
|
image: gcr.io/cadvisor/cadvisor:latest
|
|
container_name: lux-dex-cadvisor
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8088:8080"
|
|
volumes:
|
|
- /:/rootfs:ro
|
|
- /var/run:/var/run:ro
|
|
- /sys:/sys:ro
|
|
- /var/lib/docker/:/var/lib/docker:ro
|
|
- /dev/disk/:/dev/disk:ro
|
|
privileged: true
|
|
devices:
|
|
- /dev/kmsg
|
|
networks:
|
|
- lux-monitoring
|
|
|
|
networks:
|
|
dex-network:
|
|
external: true
|
|
name: dex_dex-network |