prometheus/blackbox_exporter

Option to disable exporter metrics

muety opened this issue · 4 comments

muety commented

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

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

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 commented

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