# Kafka Consumer Input Plugin error

**URL:** <https://community.influxdata.com/t/kafka-consumer-input-plugin-error/1246>\
**Category:** Telegraf\
**Created:** [June 9, 2017, 5:54pm UTC](https://community.influxdata.com/t/kafka-consumer-input-plugin-error/1246 "2017-06-09T17:54:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_1](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@Steven\_1](https://community.influxdata.com/u/Steven_1)\
**Post date:** [June 9, 2017, 5:54pm UTC](https://community.influxdata.com/t/kafka-consumer-input-plugin-error/1246/1 "2017-06-09T17:54:19Z")

</div>

I use Kafka Consumer Input Plugin and I have the following `telegraf.conf`:

```
# INPUTS
[[inputs.kafka_consumer]]
  topics = ["telegraf"]
  brokers = ["bootstrap-server:9092"]
  consumer_group = "telegraf_consumer"
  offset = "oldest"
  data_format = "influx"
  max_message_len = 65536

# OUTPUTS
[[outputs.influxdb]]
  url = "host_name:8086"
  database = "telegraf"
  precision = "s"

```

After starting Telegraf I get error message:

```
2017/06/09 17:48:54 E! Error parsing /etc/telegraf.conf, line 4: field corresponding to `brokers' is not defined in `*kafka_consumer.Kafka'

```

Is anything wrong with config file?

---

<div class="post-metadata">

**Author:** ![jackzampolin](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jackzampolin/32/5_2.png) [@jackzampolin](https://community.influxdata.com/u/jackzampolin)\
**Post date:** [June 9, 2017, 6:22pm UTC](https://community.influxdata.com/t/kafka-consumer-input-plugin-error/1246/2 "2017-06-09T18:22:59Z")

</div>

@Steven_1 What version of telegraf are you running?

---

<div class="post-metadata">

**Author:** ![Steven\_1](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@Steven\_1](https://community.influxdata.com/u/Steven_1)\
**Post date:** [June 9, 2017, 6:44pm UTC](https://community.influxdata.com/t/kafka-consumer-input-plugin-error/1246/3 "2017-06-09T18:44:02Z")

</div>

I am running Telegraf v1.3

```
docker run -d --name telegraf --link influxdb:influxdb -v /etc/telegraf.conf:/etc/telegraf/telegraf.conf telegraf:1.3
```

---

<div class="post-metadata">

**Author:** ![jackzampolin](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jackzampolin/32/5_2.png) [@jackzampolin](https://community.influxdata.com/u/jackzampolin)\
**Post date:** [June 9, 2017, 6:56pm UTC](https://community.influxdata.com/t/kafka-consumer-input-plugin-error/1246/4 "2017-06-09T18:56:06Z")

</div>

To generate configuration proper for the telgraf version you are running use the config generation:

```auto
docker run -it telegraf:1.3 telegraf -sample-config -input-filter kafka_consumer -output-filter influxdb

```

We have changed to a new version of kafka consumer on master. The documentation for the older version is here. I think if you update your config accordingly then you will not run into any problems.

I always suggest that folks generate their config from the binary rather than looking online. Its faster and far less error prone.

---

<div class="post-metadata">

**Author:** ![Steven\_1](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@Steven\_1](https://community.influxdata.com/u/Steven_1)\
**Post date:** [June 9, 2017, 7:03pm UTC](https://community.influxdata.com/t/kafka-consumer-input-plugin-error/1246/5 "2017-06-09T19:03:36Z")

</div>

Thanks. It looks like it doesn’t support latest Kafka without Zookeeper, correct?

```
# SERVICE INPUT PLUGINS #
###############################################################################

# Read metrics from Kafka topic(s)
[[inputs.kafka_consumer]]
  ## topic(s) to consume
  topics = ["telegraf"]
  ## an array of Zookeeper connection strings
  zookeeper_peers = ["localhost: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 its 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"

  ## Maximum length of a message to consume, in bytes (default 0/unlimited);
  ## larger messages are dropped
  max_message_len = 65536
```

---

<div class="post-metadata">

**Author:** ![jackzampolin](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jackzampolin/32/5_2.png) [@jackzampolin](https://community.influxdata.com/u/jackzampolin)\
**Post date:** [June 9, 2017, 7:07pm UTC](https://community.influxdata.com/t/kafka-consumer-input-plugin-error/1246/6 "2017-06-09T19:07:51Z")

</div>

@Steven_1 The new plugin that we merged [does support that and will be merged into 1.4](https://github.com/influxdata/telegraf/blob/master/CHANGELOG.md#features). If you need to use that code you will need to build from master.

---

<div class="post-metadata">

**Author:** ![Steven\_1](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@Steven\_1](https://community.influxdata.com/u/Steven_1)\
**Post date:** [June 11, 2017, 1:32am UTC](https://community.influxdata.com/t/kafka-consumer-input-plugin-error/1246/7 "2017-06-11T01:32:01Z")

</div>

@jackzampolin Ok, thanks. Do you have any info when it will be officially released?

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [June 12, 2017, 5:51pm UTC](https://community.influxdata.com/t/kafka-consumer-input-plugin-error/1246/8 "2017-06-12T17:51:52Z")

</div>

Currently planned for mid July, I’m tracking the date using the github [milestones](https://github.com/influxdata/telegraf/milestones).

---

<div class="post-metadata">

**Author:** ![Steven\_1](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@Steven\_1](https://community.influxdata.com/u/Steven_1)\
**Post date:** [July 11, 2017, 5:46pm UTC](https://community.influxdata.com/t/kafka-consumer-input-plugin-error/1246/9 "2017-07-11T17:46:18Z")

</div>

I am curious if new Telegraf version will be release this week.

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [July 11, 2017, 6:03pm UTC](https://community.influxdata.com/t/kafka-consumer-input-plugin-error/1246/10 "2017-07-11T18:03:20Z")

</div>

@Steven_1 We are going to hold off a bit longer on 1.4 since many of the features we wanted are not ready yet. I’ll keep the milestone updated with the tentative date but of course it is always subject to change.
