From 1e35c8e2268c96ba5ed11881c34aaf676e635f22 Mon Sep 17 00:00:00 2001 From: Sunil Thaha Date: Wed, 4 Sep 2024 12:05:00 +1000 Subject: [PATCH] chore(compose/metal): add node-exporter (#1760) Signed-off-by: Sunil Thaha --- .../compose/validation/metal/compose.yaml | 25 +++++++++++++++++++ .../compose/validation/metal/override.yaml | 1 + .../prometheus/scrape-configs/metal.yaml | 4 +++ 3 files changed, 30 insertions(+) diff --git a/manifests/compose/validation/metal/compose.yaml b/manifests/compose/validation/metal/compose.yaml index 21ceceefce..174a463095 100644 --- a/manifests/compose/validation/metal/compose.yaml +++ b/manifests/compose/validation/metal/compose.yaml @@ -86,10 +86,35 @@ services: retries: ${HEALTHCHECK_RETRIES:-3} start_period: ${HEALTHCHECK_START_PERIOD:-1m} + node-exporter: + image: quay.io/prometheus/node-exporter:latest + pid: host + ports: + - 9100:9100 + volumes: + - type: bind + source: /proc + target: /host/proc + - type: bind + source: /sys + target: /host/sys + - type: bind + source: / + target: /rootfs + command: + - --path.procfs=/host/proc + - --path.sysfs=/host/sys + - --path.rootfs=/rootfs + - --collector.rapl # Enable RAPL collector + - --collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/) + user: root + networks: + - node-exporter-network networks: scaph-network: kepler-network: + node-exporter-network: # # # NOTE: To allow access to VM from prometheus container diff --git a/manifests/compose/validation/metal/override.yaml b/manifests/compose/validation/metal/override.yaml index 5c162eda3c..25b276b9e4 100644 --- a/manifests/compose/validation/metal/override.yaml +++ b/manifests/compose/validation/metal/override.yaml @@ -15,6 +15,7 @@ services: networks: - scaph-network - kepler-network + - node-exporter-network - virt-net # external n/w for accessing VM volumes: - type: bind diff --git a/manifests/compose/validation/metal/prometheus/scrape-configs/metal.yaml b/manifests/compose/validation/metal/prometheus/scrape-configs/metal.yaml index 923dde87ff..3079d5cd50 100644 --- a/manifests/compose/validation/metal/prometheus/scrape-configs/metal.yaml +++ b/manifests/compose/validation/metal/prometheus/scrape-configs/metal.yaml @@ -10,3 +10,7 @@ scrape_configs: - job_name: metal static_configs: - targets: [kepler-metal:8888] + + - job_name: node-exporter + static_configs: + - targets: [node-exporter:9100]