diff --git a/prometheus/prometheus.yml b/config/prometheus.yml similarity index 52% rename from prometheus/prometheus.yml rename to config/prometheus.yml index 4826bf8..2fac6f4 100644 --- a/prometheus/prometheus.yml +++ b/config/prometheus.yml @@ -9,23 +9,39 @@ scrape_configs: static_configs: - targets: ['localhost:9090'] + - job_name: 'node_exporter' + scrape_interval: 5s + static_configs: + - targets: + - 'ddocker3.maison:9090' + - 'pfsense.serveur:9100' + relabel_configs: + - source_labels: [__address__] + target_label: job + replacement: 'Node_Exporter' + - job_name: 'cadvisor' scrape_interval: 5s static_configs: - - targets: ['localhost:8180'] + - targets: ['cadvisor:8080'] - job_name: 'blackbox' metrics_path: /probe + scrape_interval: 5s params: module: [http_2xx] static_configs: - targets: - https://jeedom.sda.zone - - https://plex.tondomaine.fr + - https://librenms.sda.zone + - https://hoarder.sda.zone + - https://affine.sda.zone + - https://blinko.sda.zone + - https://gitea.sda.zone relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__ - replacement: localhost:9115 + replacement: blackbox_exporter:9115 diff --git a/docker-compose.yml b/docker-compose.yml index ebe6897..792fb4d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,10 +4,10 @@ services: container_name: prometheus user: '0' volumes: - - /var/lib/docker/volumes/prometheus/prometheus:/etc/prometheus + - ./config/prometheus.yml:/etc/prometheus/prometheus.yml - /var/lib/docker/volumes/prometheus/prometheus_data:/prometheus ports: - - "9090:9090" + - "19090:9090" command: - "--config.file=/etc/prometheus/prometheus.yml" restart: unless-stopped @@ -17,7 +17,7 @@ services: container_name: grafana user: '0' ports: - - "3100:3000" + - "13000:3000" volumes: - /var/lib/docker/volumes/prometheus/grafana_data:/var/lib/grafana restart: unless-stopped @@ -34,7 +34,7 @@ services: container_name: cadvisor user: '0' ports: - - "8180:8080" + - "18080:8080" volumes: - /:/rootfs:ro - /var/run:/var/run:ro @@ -47,7 +47,7 @@ services: container_name: blackbox_exporter user: '0' ports: - - "9115:9115" + - "19115:9115" volumes: - /var/lib/docker/volumes/prometheus/blackbox:/etc/blackbox_exporter restart: unless-stopped