prometheus & grafana & pushgateway
docker-compose.yml
version: '3'
services:
prometheus:
image: prom/prometheus
container_name: prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- '9090:9090'
extra_hosts:
- "host.docker.internal:host-gateway" #与host通信
pushgateway:
image: prom/pushgateway
container_name: pushgateway
ports:
- '9091:9091'
grafana:
image: grafana/grafana
container_name: grafana
ports:
- '3000:3000'
prometheus.yml
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'pushgateway'
static_configs:
- targets: ['pushgateway:9091']
- job_name: 'grafana'
static_configs:
- targets: ['grafana:3000']
- job_name: 'jaeger'
static_configs:
- targets: ['host.docker.internal:14269']
- job_name: 'node-exporter'
static_configs:
- targets: ['host.docker.internal:9100']
jaeger
docker-compose.yml
version: "2"
services:
# Jaeger
jaeger-all-in-one:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686" # Jaeger UI
- "14268:14268" # Receive legacy OpenTracing traces, optional
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
- "14250:14250" # Receive from external otel-collector, optional
- "14269:14269"
environment:
- COLLECTOR_OTLP_ENABLED=true