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

Option to disable exporter metrics #1046

Open
muety opened this issue Mar 22, 2023 · 4 comments
Open

Option to disable exporter metrics #1046

muety opened this issue Mar 22, 2023 · 4 comments

Comments

@muety
Copy link

muety commented Mar 22, 2023

I'd like to have an option to enable metrics such as go_memstats_alloc_bytes, etc. Analogously to prometheus/node_exporter#1148.

@SuperQ
Copy link
Member

SuperQ commented Mar 22, 2023

I'm thinking we should start to integrate this into the exporter-toolkit.

@dswarbrick
Copy link
Contributor

I'd like to have an option to enable metrics such as go_memstats_alloc_bytes, etc. Analogously to prometheus/node_exporter#1148.

Enable, or disable?

The metrics are present by default in blackbox_exporter:

# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 483680

If you don't want the metrics, a workaround for now is to drop them in the scrape job, e.g.

  metric_relabel_configs:
  - source_labels: [__name__]
    regex: go_\S+
    action: drop

@muety
Copy link
Author

muety commented Apr 2, 2023

Sorry, I meant disable of course. Thank for that! Didn't know about the exclude regex, very helpful! 👍

@beorn7
Copy link
Member

beorn7 commented Oct 24, 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

4 participants