Files
symon/docker-compose/prometheus.yml
2025-11-07 19:13:23 +01:00

22 lines
602 B
YAML

global:
scrape_interval: 10s # Quanto spesso fare lo scraping
evaluation_interval: 10s
rule_files:
- /etc/prometheus/rules/*.yml
scrape_configs:
# Job 1: Monitora se Prometheus stesso è attivo
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
# Job 2: Scrape dell'OpenTelemetry Collector
- job_name: 'otel-collector'
# Il Collector espone le metriche per lo scraping sulla sua porta 8889
metrics_path: '/metrics'
static_configs:
# Raggiunge il Collector usando il suo nome di servizio Docker
- targets: ['otel-collector:8889']