What changes can help me to get the all process info.
[[inputs.procstat]]
alias = “process_stats”
name_override = “process_stats”
pid_tag = true
fieldpass = [“cpu_usage”,
“memory_usage”,
“memory_swap”,
“nice_priority”,
]
pattern = “.*”
[inputs.procstat.tags]
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”
VERSION=“2.0.20230426”
ID=mariner
VERSION_ID=“2.0”
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…