ncabatoff / process-exporter

Prometheus exporter that mines /proc to report on selected processes
MIT License
1.7k stars 269 forks source link

Enable/Disable threads on specific programs #314

Open Lusitaniae opened 2 months ago

Lusitaniae commented 2 months ago

Since threads adds a lot of overhead and cardinality to metrics, would be interesting if we could restrict threads to one of the multiple process monitored by process exporter

Lusitaniae commented 2 months ago

For now doing that on prometheus / scraping side by using metrics relabel

so as to only keep thread metrics for my app1/app2, nothing else

    metric_relabel_configs:
      - action: keep
        source_labels: [__name__, groupname]
        regex: namedprocess_namegroup_thread_.*;(app1|app2).*