Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--collector.disable-defaults doesn't disable cpu metric #2978

Closed
Karpich opened this issue Mar 25, 2024 · 1 comment
Closed

--collector.disable-defaults doesn't disable cpu metric #2978

Karpich opened this issue Mar 25, 2024 · 1 comment

Comments

@Karpich
Copy link

Karpich commented Mar 25, 2024

Host operating system: output of uname -a

Linux redis-inmem-development-05 4.19.0-21-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64 GNU/Linux

node_exporter version: output of node_exporter --version

node_exporter, version 1.7.0 (branch: HEAD, revision: 7333465abf9efba81876303bb57e6fadb946041b)
  build user:       root@35918982f6d8
  build date:       20231112-23:53:35
  go version:       go1.21.4
  platform:         linux/amd64
  tags:             netgo osusergo static_build

node_exporter command line flags

EXPORTER_OPTIONS="--web.listen-address=0.0.0.0:9100 --collector.disable-defaults --collector.netclass --collector.netdev --collector.netstat --collector.sockstat --collector.softnet --collector.udp_queues"

Are you running node_exporter in Docker?

No
`

What did you expect to see?

hi all.
I have a task to disable the output of all metrics except network ones. I added a key --collector.disable-defaults, however the output still shows the processor parameters

What did you see instead?

curl http://127.0.0.1:9100/metrics | grep -i cpu
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 0.18

What do I need to do to get only network metrics?
Thank you

@SuperQ
Copy link
Member

SuperQ commented Mar 26, 2024

That is controlled by the --web.disable-exporter-metrics flag.

@SuperQ SuperQ closed this as completed Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants