Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data point missing when using procstat with multi pids outputing to influxdb #1668

Closed
piglei opened this issue Aug 25, 2016 · 8 comments · Fixed by #2149
Closed

data point missing when using procstat with multi pids outputing to influxdb #1668

piglei opened this issue Aug 25, 2016 · 8 comments · Fixed by #2149
Assignees
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@piglei
Copy link

piglei commented Aug 25, 2016

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:

@jwilder jwilder added the bug unexpected problem or unintended behavior label Sep 1, 2016
@zargex
Copy link

zargex commented Sep 27, 2016

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

@zargex
Copy link

zargex commented Oct 3, 2016

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

@sparrc sparrc mentioned this issue Oct 11, 2016
3 tasks
@ghost
Copy link

ghost commented Nov 9, 2016

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

@ghost
Copy link

ghost commented Nov 9, 2016

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 ...

@sparrc
Copy link
Contributor

sparrc commented Dec 13, 2016

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

@sparrc sparrc added this to the 1.2.0 milestone Dec 13, 2016
@ghost
Copy link

ghost commented Dec 13, 2016

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

@sparrc
Copy link
Contributor

sparrc commented Dec 13, 2016

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

@ghost
Copy link

ghost commented Dec 13, 2016

okay :( ;)

njwhite pushed a commit to njwhite/telegraf that referenced this issue Jan 31, 2017
maxunt pushed a commit that referenced this issue Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants