Nishchay Veer
10/24/2024, 6:26 PMSrikanth Chekuri
10/25/2024, 3:34 AMNishchay Veer
10/25/2024, 3:47 AMChitransh Gupta
10/25/2024, 9:13 AMNishchay Veer
10/25/2024, 12:12 PMservices:
otel-collector:
image: otel/opentelemetry-collector-contrib:latest
container_name: otel-collector
command: [ "--config=/etc/otel-collector-config.yaml" ]
volumes:
- ./otel-local-collector.yaml:/etc/otel-collector-config.yaml
ports:
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP http receiver
- "8888:8888" # Prometheus metrics exposed by the collector
- "8889:8889" # Prometheus exporter metrics
networks:
- monitoring
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
container_name: prometheus
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'
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
depends_on:
- otel-collector
networks:
- monitoring
restart: unless-stopped
networks:
monitoring:
name: monitoring-network
driver: bridge
volumes:
prometheus_data:
But it wasn't working. So I'm not sure whether it's possible with docker container