Add native Go method for finding pids to procstat (#3559)

This commit is contained in:
Ben Aldrich
2018-02-01 16:14:27 -07:00
committed by Daniel Nelson
parent 9b4177d46c
commit 551c771bba
10 changed files with 301 additions and 13 deletions

View File

@@ -27,8 +27,28 @@ Additionally the plugin will tag processes by their PID (pid_tag = true in the c
* pid
* process_name
### Windows
On windows we only support exe and pattern. Both of these are implemented using WMI queries. exe is on the Name field and pattern is on the CommandLine field.
Windows Support:
* exe (WMI Name)
* pattern (WMI CommandLine)
this allows you to do fuzzy matching but only what is supported by [WMI query patterns](https://msdn.microsoft.com/en-us/library/aa392263(v=vs.85).aspx).
Example:
Windows fuzzy matching:
```[[inputs.procstat]]
exe = "%influx%"
process_name="influxd"
prefix = "influxd"
```
### Linux
```
[[inputs.procstat]]
exe = "influxd"
@@ -48,7 +68,6 @@ The above configuration would result in output like:
# Measurements
Note: prefix can be set by the user, per process.
Threads related measurement names:
- procstat_[prefix_]num_threads value=5