From aa69e558e31e2f9bf821302f7c4a3662231fba34 Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Mon, 8 Oct 2018 00:01:07 +0200 Subject: [PATCH] add main nodexporter --- docker-compose.yml | 19 +++++++++++++++++++ prometheus/prometheus.yml | 4 ++++ 2 files changed, 23 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 084c501..cbc2e1c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -67,3 +67,22 @@ services: image: stefanwalther/speedtest-exporter networks: - back-tier + + nodeexp: + privileged: true + image: prom/node-exporter + volumes: + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /:/rootfs:ro + ports: + - 9100:9100 + restart: always + command: + - '--path.procfs=/host/proc' + - '--path.sysfs=/host/sys' + - --collector.filesystem.ignored-mount-points + - "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)" + networks: + - back-tier + diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml index 185e395..be1ac2c 100644 --- a/prometheus/prometheus.yml +++ b/prometheus/prometheus.yml @@ -51,3 +51,7 @@ scrape_configs: target_label: instance - target_label: __address__ replacement: ping:9115 # The blackbox exporter's real hostname:port. + + - job_name: 'nodeexp' + static_configs: + - targets: ['nodeexp:9100'] \ No newline at end of file