How to capture PIDs using telegraf and dump data into InfluxDB

Dear experts,
I’m using Grafana, InfluxDB and collecting data using agent “telegraf”. I’m getting all infra related data like CPU, memory, Disk and all. But how can we get data till process ID / name level like at particular time which process name / ID was consuming my resources.

Would proc stat work for you? telegraf/plugins/inputs/procstat at master · influxdata/telegraf · GitHub

That should get the PID


Thanks @philb. I’m very new to this. Need additional below information.
How to use this plugin further? Do I just need to copy the configuration codes from Procstat Input Plugin and append in Telegraf.conf file? Or need to deploy this complete file anywhere?

Thanks in advance.

@amritanshkr you just need to set the configuration details in your telegraf.conf file!


@noahcrowley thanks. Let me try that and update.