From 510e93da43dbee2443a88ed75aa0cea3b47f17b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20DEHAY?= Date: Fri, 19 Feb 2016 19:27:47 +0100 Subject: [PATCH] README updated for pgrep user support closes #724 --- CHANGELOG.md | 1 + plugins/inputs/procstat/README.md | 3 ++- plugins/inputs/procstat/procstat.go | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b85e200a6..4524b9817 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features - [#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! +- [#724](https://github.com/influxdata/telegraf/pull/724): username matching for procstat input, thanks @zorel! ### Bugfixes - [#701](https://github.com/influxdata/telegraf/pull/701): output write count shouldnt print in quiet mode. diff --git a/plugins/inputs/procstat/README.md b/plugins/inputs/procstat/README.md index 0c37af509..90552c2a6 100644 --- a/plugins/inputs/procstat/README.md +++ b/plugins/inputs/procstat/README.md @@ -7,7 +7,8 @@ individual process using their /proc data. 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. Proctstas plugin will transmit IO, memory, cpu, file descriptor related measurements for every process specified. A prefix can be set to isolate diff --git a/plugins/inputs/procstat/procstat.go b/plugins/inputs/procstat/procstat.go index c1747b1e9..e5ae207fe 100644 --- a/plugins/inputs/procstat/procstat.go +++ b/plugins/inputs/procstat/procstat.go @@ -56,7 +56,7 @@ func (_ *Procstat) Description() string { func (p *Procstat) Gather(acc telegraf.Accumulator) error { err := p.createProcesses() 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()) } else { for _, proc := range p.pidmap {