如何设置 telegraf 配置以在 Elasticsearch 中收集 kafka topic/partition 滞后

How set telegraf configuration to collect kafka topic/partition lags in Elasticsearch

我想在 Elasticsearch 中放置 kafka topic/partition 滞后。 通过使用 kafka burrow 和 telegraf.

我已经在本地macbook上安装了kafka、burrow、telegraf和Elasticsearch。我知道 telegraf 有一个 burrow-input 插件。

telegraf burrow 插件:https://github.com/influxdata/telegraf/tree/master/plugins/inputs/burrow

请告诉我如何设置 telegraf 配置以在 Elasticsearch 中收集 topic/partition 延迟。

谢谢。

如果你想把telegraf做成数据管道连接Burrow和Elasticsearch。使用以下配置。

telegraf.conf

[[inputs.burrow]]
  servers = ["http://burrowIp:8000"]
  topics_exclude = [ "__consumer_offsets" ]
  groups_exclude = ["console-*"]

[[outputs.elasticsearch]]
  urls = [ "http://elasticsearchIp:9200" ] 
  timeout = "5s"
  enable_sniffer = false
  health_check_interval = "10s"
  index_name = "burrow-%Y.%m.%d" 
  manage_template = false

此设置会在 Elastic Search 上累积数据。