Telegraf: data point missing when using procstat with multi pids outputing to influxdb

Created on 25 Aug 2016  路  8Comments  路  Source: influxdata/telegraf

Bug report

When using prostat plugin with pattern matching, if it matches multi pids, multi data points are generated with identical tags and timestamp. when these points are sent to influxdb, only the last point was stored correctly, former points will be overwritten repeatedly.

This will result in only one pid's data will be found in the database, instead of one point per pid.

Relevant telegraf.conf:

[[input:procstat]]
# Use pattern matching
pattern = "ANY PATTERN MATCHING MULTI PIDS"

System info:

telegraf-1.0.0-beta3_linux_amd64

Steps to reproduce:

  1. Use prostat input's pattern matching method, match multi pids.
  2. Produce to influxdb output

    Expected behavior:

One data point per pid will be written to database.

Actual behavior:

Only the last pid data point can be found, others got overwritten.

Additional info:

bug

Most helpful comment

I don't know if it's possible (or already done) to send 1 datapoint per PID, but also 1 datapoint with de sum of all PID ?
with an option in telegraf.conf
report = "each" to report each pid
report = "sum" to report only the sum of all pid found (permit to have less datapoint !

example :

  • report = "each"
    procstat,exe=foo,pid=1,cpu_usage=2, ...
    procstat,exe=foo,pid=2,cpu_usage=3, ...
    procstat,exe=foo,pid=3,cpu_usage=2, ...
  • report = "sum"
    procstat,exe=foo,pidx=sum,cpu_usage=7 ...

All 8 comments

Hi, I have the same problem in version 1.0.0 (debian package version Version: 1.0.0-1 )

I think if the procstat plugin had the pid field key as tag key, it wouldn't be this problem.

I've got the same problem to monitor Oracle process.. Multiple process, but only one is reported to influxdb (not always the same)

I don't know if it's possible (or already done) to send 1 datapoint per PID, but also 1 datapoint with de sum of all PID ?
with an option in telegraf.conf
report = "each" to report each pid
report = "sum" to report only the sum of all pid found (permit to have less datapoint !

example :

  • report = "each"
    procstat,exe=foo,pid=1,cpu_usage=2, ...
    procstat,exe=foo,pid=2,cpu_usage=3, ...
    procstat,exe=foo,pid=3,cpu_usage=2, ...
  • report = "sum"
    procstat,exe=foo,pidx=sum,cpu_usage=7 ...

in 1.2 there will be a config option on the procstat plugin for adding the pid as a tag

Will it be possible to add also the generic tag "sum" and "each" like in my example below ?

@ptitou don't think so, sorry, could be possible in the future with aggregator plugins

okay :( ;)

Was this page helpful?
0 / 5 - 0 ratings