README updated for pgrep user support

closes #724
This commit is contained in:
Aurélien DEHAY 2016-02-19 19:27:47 +01:00 committed by Michele Fadda
parent 5b2aea0b38
commit 510e93da43
3 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,7 @@
### Features ### Features
- [#727](https://github.com/influxdata/telegraf/pull/727): riak input, thanks @jcoene! - [#727](https://github.com/influxdata/telegraf/pull/727): riak input, thanks @jcoene!
- [#694](https://github.com/influxdata/telegraf/pull/694): DNS Query input, thanks @mjasion! - [#694](https://github.com/influxdata/telegraf/pull/694): DNS Query input, thanks @mjasion!
- [#724](https://github.com/influxdata/telegraf/pull/724): username matching for procstat input, thanks @zorel!
### Bugfixes ### Bugfixes
- [#701](https://github.com/influxdata/telegraf/pull/701): output write count shouldnt print in quiet mode. - [#701](https://github.com/influxdata/telegraf/pull/701): output write count shouldnt print in quiet mode.

View File

@ -7,7 +7,8 @@ individual process using their /proc data.
The plugin will tag processes by their PID and their process name. The plugin will tag processes by their PID and their process name.
Processes can be specified either by pid file or by executable name. Procstat Processes can be specified either by pid file, by executable name, by command
line pattern matching, or by username (in this order or priority. Procstat
plugin will use `pgrep` when executable name is provided to obtain the pid. plugin will use `pgrep` when executable name is provided to obtain the pid.
Proctstas plugin will transmit IO, memory, cpu, file descriptor related Proctstas plugin will transmit IO, memory, cpu, file descriptor related
measurements for every process specified. A prefix can be set to isolate measurements for every process specified. A prefix can be set to isolate

View File

@ -56,7 +56,7 @@ func (_ *Procstat) Description() string {
func (p *Procstat) Gather(acc telegraf.Accumulator) error { func (p *Procstat) Gather(acc telegraf.Accumulator) error {
err := p.createProcesses() err := p.createProcesses()
if err != nil { if err != nil {
log.Printf("Error: procstat getting process, exe: [%s] pidfile: [%s] pattern: [%s] user: [%s] %s", log.Printf("Error: procstat getting process, exe: [%s] pidfile: [%s] pattern: [%s] user: [%s] %s",
p.Exe, p.PidFile, p.Pattern, p.User, err.Error()) p.Exe, p.PidFile, p.Pattern, p.User, err.Error())
} else { } else {
for _, proc := range p.pidmap { for _, proc := range p.pidmap {