-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
input.procstat : be able to search process by user and name #14666
Comments
Hi, I would instead suggest using [[inputs.procstat]]
user = "root"
metricpass = "tags.process_name == \"httpd\"" There are a number of different methods on proctstat to gather information. This is due to historical reasons of adding more and more reasons. We certainly are not breaking this and instead you can use filtering. Don't assume the defaults were chosen because they are the best, it could be that they were the first implemented as this plugin has had a lot of development over time. |
It look like : |
Sorry @powersj What is the difference between :
and
Thanks |
If you have general questions can you please use the slack or forums, rather than asking on closed issue?
Those docs are not kept 100% in line with the repo. Feel free to scroll to the bottom of the docs site and file an issue there.
Run it and see ;) |
Use Case
It is currently not possible to collect information about a process by filtering on name and user.
For example, on some applications, there is a parent process owned by root that is critical and child processes that do not deserve supervision.
It would therefore seem wise to me that the collection criteria be cumulative.
[[inputs.procstat]]
exe = "httpd"
user = "root"
This is documented in :
https://github.com/influxdata/telegraf/blob/master/plugins/inputs/procstat/README.md#procstat-input-plugin
Expected behavior
Telefraf report data only for httpd processes running as root.
Actual behavior
Telefraf report data for all httpd processes.
Additional info
What do you think ?
Perhaps this requires a breaking change?
I would like to try to make a PR on the subject.
Another question :
Why maintain 2 collection systems on the servers?
The default mode (pgrep) requires a binary which is not necessarily present on all platforms (eg: Windows).
Why isn't "native" mode the default? What is its disadvantage?
The text was updated successfully, but these errors were encountered: