ncabatoff / process-exporter

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

How to differienciate mutile process with same process name? #279

Open nickwu2008 opened 1 year ago

nickwu2008 commented 1 year ago

How to differienciate mutile process with same process name The three processes has same process name 'padms' like below

[m119@test019 ~]$ ps -ef | grep "./padms"|grep -v test
m119    67110 147204  0 14:32 pts/13   00:00:00 ./padms
m119    67111  67110  0 14:32 pts/13   00:00:12 ./padms
m119    67345  67111  0 09:37 pts/13   00:00:04 [padms] <defunct>

I want to monitor the two process with below configration

process_names:

  - name: "{{.ExeFull}}"
    cmdline:
    - './padms'

Then observer the three processes metrics in grafana site,I only find one metrics with padms. How to differienciate the three processes ?

tangguangliang commented 10 months ago

在name中添加Pid {{.PID}}

Template variables available: