-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
bugunexpected problem or unintended behaviorunexpected problem or unintended behavior
Description
Relevant telegraf.conf
[[inputs.procstat]]
pid_finder = "native"
[[inputs.procstat.filter]]
name = "NAMENODE"
process_names = ["java"]
patterns = ["org\\.apache\\.hadoop\\.hdfs\\.server\\.namenode\\.NameNode"]
users = ["hdfs"]
Logs from Telegraf
RAS
System info
Telegraf 1.36, Red Hat Enterprise Linux Server release 7.6 (Maipo)
Docker
No response
Steps to reproduce
- start processus with non local user
- try to find by username with telegraf running as non root
Expected behavior
Process not found
Actual behavior
Process should be found
Additional info
Because of the use of the "id" command, which must be run by root, searching by NIS user when Telegraf is not running as root doesn't work.
https://github.com/influxdata/telegraf/blob/master/plugins/inputs/procstat/os_linux.go#L46
I'm not a Go expert, but it would be interesting to see if a Golang primitive allows the equivalent of the "id -nu " command?
Metadata
Metadata
Assignees
Labels
bugunexpected problem or unintended behaviorunexpected problem or unintended behavior