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'] # Job 3: Node Exporter - Metriche del sistema host - job_name: 'node-exporter' static_configs: - targets: ['node-exporter:9100'] labels: instance: 'docker-host' environment: 'production'