From 81b370d4e4c69c41a91b62d8ab775678f895d946 Mon Sep 17 00:00:00 2001 From: Vimal Kumar Date: Wed, 23 Oct 2024 15:40:49 -0400 Subject: [PATCH] fix(compose): Enable measuring ContextSwitches in node-exporter Signed-off-by: Vimal Kumar --- manifests/compose/dev/compose.yaml | 5 +++++ manifests/compose/validation/metal/compose.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/manifests/compose/dev/compose.yaml b/manifests/compose/dev/compose.yaml index 0e5ec861d9..9cde543def 100644 --- a/manifests/compose/dev/compose.yaml +++ b/manifests/compose/dev/compose.yaml @@ -103,10 +103,15 @@ services: - --collector.cpu - --collector.cpufreq - --collector.perf + - --collector.perf.cpus=0-19 # specify range of all cpus + - --collector.perf.software-profilers=ContextSwitch - --collector.meminfo - --collector.rapl - --collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/) user: root + cap_add: # Add capabilities for perf collection. + - SYS_ADMIN + - SYS_PTRACE networks: - node-exporter-network diff --git a/manifests/compose/validation/metal/compose.yaml b/manifests/compose/validation/metal/compose.yaml index e959abb742..6b12b910c6 100644 --- a/manifests/compose/validation/metal/compose.yaml +++ b/manifests/compose/validation/metal/compose.yaml @@ -110,10 +110,15 @@ services: - --collector.cpu - --collector.cpufreq - --collector.perf + - --collector.perf.cpus=0-19 # specify range of all cpus + - --collector.perf.software-profilers=ContextSwitch - --collector.meminfo - --collector.rapl - --collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/) user: root + cap_add: # Add capabilities for perf collection. + - SYS_ADMIN + - SYS_PTRACE networks: - node-exporter-network