ncabatoff / process-exporter

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

Process-exporter can not just track parent process #232

Open arvinyuan1991 opened 2 years ago

arvinyuan1991 commented 2 years ago

As a developer,there are special cases where we want to trace only the parent process,but currently there is no paremeter to control whether we need to trace the child process,the default is to trace all of its children.could you add a new parameter(-onlyparent) like -children to realize it,thanks a lot.

processes: xxxxxx 28479 21634 0 13:32 pts/3 00:00:00 python3 arvin_test.py xxxxxx 28480 28479 0 13:32 pts/3 00:00:00 python3 arvin_mock.py xxxxxx 28481 28480 0 13:32 pts/3 00:00:00 python3 arvin_check.py

We just want to trace 28479,but it traced 28479,28480 and 28481.

process_name.yaml: process_names:

BR/Arvin