process-exporter icon indicating copy to clipboard operation
process-exporter copied to clipboard

Enable/Disable threads on specific programs

Open Lusitaniae opened this issue 1 year ago • 2 comments

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 avatar Aug 23 '24 07:08 Lusitaniae

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).*

Lusitaniae avatar Aug 26 '24 08:08 Lusitaniae

i was wondering if the -threads parameter would fix that. But it seems it's not the case. So i will use your method. Thx

Laudatore avatar Jul 04 '25 08:07 Laudatore