I want to collect process stats for all the process including root access. I am using proc_stat plugin but that is only collecting process info run by telegraf.. how do i get the complete process info data

What changes can help me to get the all process info.
alias = “process_stats”
name_override = “process_stats”
pid_tag = true
fieldpass = [“cpu_usage”,
pattern = “.*”
category = “system”

@Satish_A your config does provide all processes when testing on my machine. Which OS are you using? Do you limit capabilities of the Telegraf user? Can you please copy your config to a file and run

telegraf --config <your config above> --test --debug

and check the reported metrics on that console!?

azureuser@cassandra-jump000000 [ ~ ]$ cat /etc/os-release
NAME=“Common Base Linux Mariner”

Looks like i don’t permission to run telegraf at root level… if i ran same command with sudo …it is showing all the information.
in this case, What sort of configauration we can apply for telegraf to run as at root level permissions.

azureuser@cassandra-jump000000 [ ~ ]$ telegraf --config /etc/telegraf/telegraf.d/inputs.conf --test --debug
2023-07-28T15:12:54Z I! Loading config file: /etc/telegraf/telegraf.d/inputs.conf
2023-07-28T15:12:54Z E! error loading config file /etc/telegraf/telegraf.d/inputs.conf: open /etc/telegraf/telegraf.d/inputs.conf: permission denied

Ummm change the permissions of /etc/telegraf/telegraf.d/inputs.conf so it is readable by the Telegraf user? That is not really a Telegraf question, but rather a basic Linux one…