From ddc2f645932ec772d957def48ab504cc2081539f Mon Sep 17 00:00:00 2001 From: Alexander Blagoev Date: Mon, 24 Apr 2017 21:18:55 +0300 Subject: [PATCH] Improve procstat input documentation (#2699) closes #1895 --- plugins/inputs/procstat/README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/plugins/inputs/procstat/README.md b/plugins/inputs/procstat/README.md index d31120743..7f3d468cc 100644 --- a/plugins/inputs/procstat/README.md +++ b/plugins/inputs/procstat/README.md @@ -5,8 +5,6 @@ The procstat plugin can be used to monitor system resource usage by an 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, 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. @@ -14,6 +12,19 @@ Procstat plugin will transmit IO, memory, cpu, file descriptor related measurements for every process specified. A prefix can be set to isolate individual process specific measurements. +The plugin will tag processes according to how they are specified in the configuration. If a pid file is used, a "pidfile" tag will be generated. +On the other hand, if an executable is used an "exe" tag will be generated. Possible tag names: + +* pidfile +* exe +* pattern +* user + +Additionally the plugin will tag processes by their PID (pid_tag = true in the config) and their process name: + +* pid +* process_name + Example: ``` @@ -28,8 +39,8 @@ Example: The above configuration would result in output like: ``` -> procstat,name="dnsmasq",pid="44979" cpu_user=0.14,cpu_system=0.07 -> procstat,name="influxd",pid="34337" influxd_cpu_user=25.43,influxd_cpu_system=21.82 +> procstat,pidfile=/var/run/lxc/dnsmasq.pid,process_name=dnsmasq,pid=44979 cpu_user=0.14,cpu_system=0.07 +> procstat,exe=influxd,process_name=influxd,pid=34337 influxd_cpu_user=25.43,influxd_cpu_system=21.82 ``` # Measurements