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

Fieldpass Configuration on Aggregators Filters Original Metrics #5209

Closed
KarstenSchnitter opened this issue Jan 2, 2019 · 1 comment · Fixed by #5266
Closed

Fieldpass Configuration on Aggregators Filters Original Metrics #5209

KarstenSchnitter opened this issue Jan 2, 2019 · 1 comment · Fixed by #5266
Labels
bug unexpected problem or unintended behavior regression something that used to work, but is now broken
Milestone

Comments

@KarstenSchnitter
Copy link
Contributor

When configuring a 'fieldpass' property on an aggregator, all metrics including the originals are filtered. Previously the originals where passed on unaltered.

Relevant telegraf.conf:

[[inputs.net]]
  fieldpass = ["bytes_recv", "bytes_sent"]

[[aggregators.minmax]]
  period = "30s"
  drop_original = false
  fieldpass = ["bytes_recv"]

System info:

failure noticed in Telegraf 1.9.1,
previous behaviour verified with Telegraf 1.8.1

Steps to reproduce:

Start Telegraf with above configuration. You can choose a different input if you adjust the fields accordingly.

Expected behavior:

original metrics are passed unaltered, aggregator is applied to filtered fields

net,host=redacted,interface=en0 bytes_sent=100i,bytes_recv=1000i 1546427377100000000
net,host=redacted,interface=en0 bytes_recv=2000i,bytes_sent=200i 1546427377200000000
...
net,host=redacted,interface=en0 
bytes_recv_max=2000i,bytes_recv_min=1000i 1546427377300000000

Actual behavior:

original metrics and aggregations only contain filtered fields from aggregator

net,host=redacted,interface=en0 bytes_recv=1000i 1546427377100000000
net,host=redacted,interface=en0 bytes_recv=2000i 1546427377200000000
...
net,host=redacted,interface=en0 
bytes_recv_max=2000i,bytes_recv_min=1000i 1546427377300000000

Additional info:

full config used:

[agent]
  interval = "10s"
  debug = true
  quiet = false
  logfile = "./telegraf.log"

[[outputs.file]]
   data_format = "influx"
   files = ["stdout"]
   
[[inputs.net]]
  fieldpass = ["bytes_recv", "bytes_sent"]

[[aggregators.minmax]]
  period = "30s"
  drop_original = false
  fieldpass = ["bytes_recv"]
@danielnelson danielnelson added this to the 1.9.2 milestone Jan 2, 2019
@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Jan 2, 2019
@danielnelson danielnelson added the regression something that used to work, but is now broken label Jan 8, 2019
@KarstenSchnitter
Copy link
Contributor Author

I tested the new version with my production configuration. The fix is working. Keep up the good work.

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 regression something that used to work, but is now broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants