Как установить точность времени телеграфа statsd (influxdb)?

Я использую telegraf с influxdb, а в telegraf использую плагин statsd_input.

statsd_input.conf:

[[inputs.statsd]]
  ## Address and port to host UDP listener on
  service_address = ":8126"

  ## The following configuration options control when telegraf clears it's cache
  ## of previous values. If set to false, then telegraf will only clear it's
  ## cache when the daemon is restarted.
  ## Reset gauges every interval (default=true)
  delete_gauges = true
  ## Reset counters every interval (default=true)
  delete_counters = true
  ## Reset sets every interval (default=true)
  delete_sets = true
  ## Reset timings & histograms every interval (default=true)
  delete_timings = true

  ## Percentiles to calculate for timing & histogram stats
  percentiles = [90]

  ## separator to use between elements of a statsd metric
  metric_separator = "."

  ## Parses tags in the datadog statsd format
  ## http://docs.datadoghq.com/guides/dogstatsd/
  parse_data_dog_tags = true

  ## Statsd data translation templates, more info can be read here:
  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#graphite
  # templates = [
  #     "cpu.* measurement*"
  # ]

  ## Number of UDP messages allowed to queue up, once filled,
  ## the statsd server will start dropping packets
  allowed_pending_messages = 10000

  ## Number of timing/histogram values to track per-measurement in the
  ## calculation of percentiles. Raising this limit increases the accuracy
  ## of percentiles but also increases the memory usage and cpu time.
  percentile_limit = 1000

Я пытаюсь установить точность времени в секундах. Я пытался это сделать в файле telegram.conf, но в примечаниях написано, что настройка точности не влияет на плагин statsd:

## By default, precision will be set to the same timestamp order as the
## collection interval, with the maximum being 1s.
## Precision will NOT be used for service inputs, such as logparser and statsd.
## Valid values are "ns", "us" (or "µs"), "ms", "s".
precision = ""

Я не видел настройку precision в файле statsd_input.conf. Каков правильный способ добиться этого?


person Yuval Pruss    schedule 28.11.2018    source источник
comment
Для этого опубликовано улучшение здесь: github.com/influxdata/telegraf/issues/1589 но он существует уже два года, так что не выглядит многообещающе. Один из перечисленных обходных путей — send the data with the desired timestamp to socket_listener.   -  person Guilherme Lopes    schedule 02.12.2018
comment
@GuilhermeLopes Да, я уже делаю это ... нет способа убедиться, что это точно с настройкой в ​​​​этом или других файлах конфигурации?   -  person Yuval Pruss    schedule 02.12.2018
comment
Не будет ли лучше оставить все как есть на стороне агента и манипулировать точностью на стороне БД (или изменить ее в Kapacitor)? Что это за конечная необходимость, чтобы установить его прямо на точку сбора, не могли бы вы уточнить, пожалуйста?   -  person Yuri G    schedule 04.12.2018


Ответы (1)


К сожалению, это не поддерживается influxdb. Обходной путь — отправить информацию с помощью socket_listener с правильной отметкой времени.

Эта информация соответствует зарегистрированным проблемам на GitHub influxdb.

person AnonymousSB    schedule 09.12.2018