0

我有一个向 Telegraf 发送一些指标的应用程序。Telegraf 聚合它们并将聚合和非 0 聚合数据存储到 InfluxDb。我对 Telegraf 插件有疑问[[aggregators.basicstats]]。它工作不正确。这是我的 telegraf.config:

[agent]
  interval = "2s"
  round_interval = true
  omit_hostname = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "10s"
  flush_jitter = "0s"
  precision = ""
  debug = true
  quiet = false
  logfile = ""

[[inputs.influxdb_v2_listener]]
  service_address = ":8086"

[[aggregators.basicstats]]
  period = "30s"
  drop_original = false
  stats = ["sum"]

[[outputs.influxdb_v2]]
  urls = ["http://localhost:8087"]
  token = "my token"
  organization = "my org"
  bucket = "my bucket"

如您所见,我使用的唯一插件是[[aggregators.basicstats]]. 它消耗所有传入的数据,汇总它们的值并将所有数据写入 InfluxDb。但是聚合数据的总和远小于非聚合值的总和。我不明白为什么会这样?如何正确聚合数据?

4

0 回答 0