From 35e160b270727b92dcff32d89be832488a73e19d Mon Sep 17 00:00:00 2001 From: Kaiyi Date: Wed, 6 Nov 2024 20:22:05 -0500 Subject: [PATCH] feat(process-exporter): Add process-exporter to dev and metal process-exporter is a useful tool for baremetal validation. It can be used for process to process performance metric comparison like cpu time. Signed-off-by: Kaiyi --- manifests/compose/dev/compose.yaml | 17 +++++++++++++++++ .../compose/dev/config/process-exporter.yaml | 4 ++++ manifests/compose/dev/override.yaml | 1 + .../dev/prometheus/scrape-configs/dev.yaml | 4 ++++ .../validation/config/process-exporter.yaml | 4 ++++ manifests/compose/validation/metal/compose.yaml | 17 +++++++++++++++++ .../compose/validation/metal/override.yaml | 1 + .../metal/prometheus/scrape-configs/metal.yaml | 4 ++++ 8 files changed, 52 insertions(+) create mode 100644 manifests/compose/dev/config/process-exporter.yaml create mode 100644 manifests/compose/validation/config/process-exporter.yaml diff --git a/manifests/compose/dev/compose.yaml b/manifests/compose/dev/compose.yaml index 9cde543def..c07c740cd2 100644 --- a/manifests/compose/dev/compose.yaml +++ b/manifests/compose/dev/compose.yaml @@ -136,8 +136,25 @@ services: networks: - libvirt-exporter-network + process-exporter: + image: ncabatoff/process-exporter + privileged: true + ports: + - 9256:9256 + command: + - '--procfs=/host/proc' + - '--config.path=/config/process-exporter.yaml' + volumes: + - ./config/process-exporter.yaml:/config/process-exporter.yaml + - /proc:/host/proc:ro + + networks: + - process-exporter-network + networks: scaph-network: kepler-network: node-exporter-network: libvirt-exporter-network: + process-exporter-network: + diff --git a/manifests/compose/dev/config/process-exporter.yaml b/manifests/compose/dev/config/process-exporter.yaml new file mode 100644 index 0000000000..f0606b2414 --- /dev/null +++ b/manifests/compose/dev/config/process-exporter.yaml @@ -0,0 +1,4 @@ +process_names: + - name: "{{.PID}}" + cmdline: + - '.+' \ No newline at end of file diff --git a/manifests/compose/dev/override.yaml b/manifests/compose/dev/override.yaml index 80578b4064..7163426970 100644 --- a/manifests/compose/dev/override.yaml +++ b/manifests/compose/dev/override.yaml @@ -18,3 +18,4 @@ services: - scaph-network - node-exporter-network - libvirt-exporter-network + - process-exporter-network \ No newline at end of file diff --git a/manifests/compose/dev/prometheus/scrape-configs/dev.yaml b/manifests/compose/dev/prometheus/scrape-configs/dev.yaml index 7c9d7195ee..ac8ca3326f 100644 --- a/manifests/compose/dev/prometheus/scrape-configs/dev.yaml +++ b/manifests/compose/dev/prometheus/scrape-configs/dev.yaml @@ -14,3 +14,7 @@ scrape_configs: - job_name: libvirt-exporter static_configs: - targets: [libvirt-exporter:9177] + + - job_name: process-exporter + static_configs: + - targets: [process-exporter:9256] \ No newline at end of file diff --git a/manifests/compose/validation/config/process-exporter.yaml b/manifests/compose/validation/config/process-exporter.yaml new file mode 100644 index 0000000000..f0606b2414 --- /dev/null +++ b/manifests/compose/validation/config/process-exporter.yaml @@ -0,0 +1,4 @@ +process_names: + - name: "{{.PID}}" + cmdline: + - '.+' \ No newline at end of file diff --git a/manifests/compose/validation/metal/compose.yaml b/manifests/compose/validation/metal/compose.yaml index 6b12b910c6..657b5c2e01 100644 --- a/manifests/compose/validation/metal/compose.yaml +++ b/manifests/compose/validation/metal/compose.yaml @@ -143,11 +143,28 @@ services: networks: - libvirt-exporter-network + process-exporter: + image: ncabatoff/process-exporter + privileged: true + ports: + - 9256:9256 + command: + - '--procfs=/host/proc' + - '--config.path=/config/process-exporter.yaml' + volumes: + - ../config/process-exporter.yaml:/config/process-exporter.yaml + - /proc:/host/proc:ro + + networks: + - process-exporter-network + networks: scaph-network: kepler-network: node-exporter-network: libvirt-exporter-network: + process-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 143239b7e8..b741af6c61 100644 --- a/manifests/compose/validation/metal/override.yaml +++ b/manifests/compose/validation/metal/override.yaml @@ -17,6 +17,7 @@ services: - kepler-network - node-exporter-network - libvirt-exporter-network + - process-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 0af60961eb..f27d905599 100644 --- a/manifests/compose/validation/metal/prometheus/scrape-configs/metal.yaml +++ b/manifests/compose/validation/metal/prometheus/scrape-configs/metal.yaml @@ -18,3 +18,7 @@ scrape_configs: - job_name: libvirt-exporter static_configs: - targets: [libvirt-exporter:9177] + + - job_name: process-exporter + static_configs: + - targets: [process-exporter:9256] \ No newline at end of file