0

I have a docker compose file:

   influx:
    image: influxdb:latest
    container_name: influxdb
    ports:
    - "8083:8083"
    - "8086:8086"
    - "8090:8090"
  telegraf:
    image: telegraf:latest
    container_name: telegraf
    links:
    - influx
    volumes:
    - ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
  grafana:
    image: grafana/grafana:latest
    container_name: grafana
    ports:
        - "3000:3000"
    links:
        - influx

And I have a telegraf conf file in which I am taking kafka topics as input source

[[inputs.kafka_consumer]]
  ## topic(s) to consume
  topics = ["telegraf"]

  ## an array of Zookeeper connection strings
  zookeeper_peers = ["zookeeper:2181"]
  ## Zookeeper Chroot
  zookeeper_chroot = ""
  ## the name of the consumer group
  consumer_group = "telegraf_metrics_consumers"
  ## Offset (must be either "oldest" or "newest")
  offset = "oldest"

  ## Data format to consume.
  ## Each data format has it's own unique set of configuration options, read
  ## more about them here:
  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
  data_format = "influx"

When I run docker-compose up , telegraf container doesn't start. It gives the below error:

Error parsing /etc/telegraf/telegraf.conf, line 1722: field corresponding to 'zookeeper_peers' is not defined in kafka_consumer.Kafka

However, I have defined zookeeper_peers in telegraf config.

Giorgos Myrianthous
  • 36,235
  • 20
  • 134
  • 156
Chandan Bhattad
  • 351
  • 1
  • 5
  • 21

0 Answers0