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

Basicstats aggregator (1.9.0) failing to "drop_original" #5084

Closed
glinton opened this issue Dec 4, 2018 · 1 comment
Closed

Basicstats aggregator (1.9.0) failing to "drop_original" #5084

glinton opened this issue Dec 4, 2018 · 1 comment
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@glinton
Copy link
Contributor

glinton commented Dec 4, 2018

Relevant telegraf.conf:

[agent]
  interval = "1s"
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "1s"
  flush_jitter = "0s"
  omit_hostname = true

[[inputs.exec]]
  command = "echo -en '{\"verb\":\"GET\",\"request\":\"/time/to/awesome\", \"status\":200}'"
  data_format = "json"
  json_string_fields = ["request"]
  tag_keys = ["verb"]
  timeout = "1s"

[[aggregators.basicstats]]
	period = "5s"
	stats = ["count"]
	name_suffix = "_count"
	drop_original = true

[[outputs.file]]

System info:

Telegraf 1.8.3 and 1.9.0
Ubuntu 18.04

Steps to reproduce:

  1. telegraf-1.9.0 --config telegraf.conf

Expected behavior:

exec_count,verb=GET status_count=6 1543938920000000000
exec_count,verb=GET status_count=5 1543938925000000000
exec_count,verb=GET status_count=5 1543938930000000000
exec_count,verb=GET status_count=5 1543938935000000000
exec_count,verb=GET status_count=5 1543938940000000000
exec_count,verb=GET status_count=5 1543938945000000000
exec_count,verb=GET status_count=5 1543938950000000000
exec_count,verb=GET status_count=5 1543938955000000000
exec_count,verb=GET status_count=5 1543938960000000000
exec_count,verb=GET status_count=5 1543938965000000000
exec_count,verb=GET status_count=5 1543938970000000000

Actual behavior:

exec_count,verb=GET status_count=5 1543938854000000000
exec_count,verb=GET status_count=5 1543938859000000000
exec_count,verb=GET status_count=5 1543938864000000000
exec_count,verb=GET status_count=5 1543938869000000000
exec_count,verb=GET status_count=5 1543938874000000000
exec,verb=GET request="/time/to/awesome",status=200 1543938874000000000
exec_count,verb=GET status_count=4 1543938879000000000
exec,verb=GET request="/time/to/awesome",status=200 1543938879000000000
exec_count,verb=GET status_count=4 1543938884000000000
exec,verb=GET request="/time/to/awesome",status=200 1543938884000000000
@russorat russorat added this to the 1.9.1 milestone Dec 4, 2018
@russorat russorat added the bug unexpected problem or unintended behavior label Dec 4, 2018
@glinton
Copy link
Contributor Author

glinton commented Dec 4, 2018

Previously, the metrics that were processed outside of the sample window (missed by a subsecond) were just dropped, 1.9.0 [https://github.com/influxdata/telegraf/blob/1.9.0/internal/models/running_aggregator.go#L126](doesn't drop) the metric, but instead adds it in. Upside is no metrics are lost, downside is it doesn't get aggregated into the next window and is "lost" if one only cares about the aggregated metrics.

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

No branches or pull requests

2 participants