# Monitor Kafka using kafka module from metricbeat

**URL:** <https://discuss.elastic.co/t/monitor-kafka-using-kafka-module-from-metricbeat/314291>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [September 13, 2022, 11:46am UTC](https://discuss.elastic.co/t/monitor-kafka-using-kafka-module-from-metricbeat/314291 "2022-09-13T11:46:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tahseen\_fatima](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tahseen_fatima/32/67789_2.png) [@tahseen\_fatima](https://discuss.elastic.co/u/tahseen_fatima)\
**Post date:** [September 13, 2022, 11:46am UTC](https://discuss.elastic.co/t/monitor-kafka-using-kafka-module-from-metricbeat/314291/1 "2022-09-13T11:46:19Z")

</div>

Hi Team,

I want to do kafka monitoring using metricbeat kafka module version 7.17v.  
I have followed the document -\> [kafka-module](https://www.elastic.co/guide/en/beats/metricbeat/7.17/metricbeat-module-kafka.html)

Configured the output to elasticsearch in metricbeat.yml file.

Executed the below two commands.

```auto
kafka-acls --authorizer-properties zookeeper.connect=localhost:2181 --add --allow-principal User:stats --operation Read --topic '*'
kafka-acls --authorizer-properties zookeeper.connect=localhost:2181 --add --allow-principal User:stats --operation Describe --group '*'

```

```auto
- module: kafka
  #metricsets:
  # - partition
  # - consumergroup
  period: 10s
  hosts: ["localhost:9092"]
  username: " *********"
  password: " *******"
  ssl.certificate_authorities: ["/etc/metricbeat/certs/kafka_ca.crt"]

```

But getting below error.

```auto
> 2022-09-13T15:44:58.285+0400 ERROR module/wrapper.go:259 Error fetching data for metricset kafka.consumergroup: error in connect: getting cluster client for advertised broker with address 1 ***** :9092: kafka: client has run out of available brokers to talk to (Is your cluster reachable?)
> 2022-09-13T15:44:58.285+0400 ERROR module/wrapper.go:259 Error fetching data for metricset kafka.partition: error in connect: getting cluster client for advertised broker with address 1 ***** :9092: kafka: client has run out of available brokers to talk to (Is your cluster reachable?)

```

Kindly help,  
Thanks,  
Tahseen

---

<div class="post-metadata">

**Author:** ![tahseen\_fatima](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tahseen_fatima/32/67789_2.png) [@tahseen\_fatima](https://discuss.elastic.co/u/tahseen_fatima)\
**Post date:** [September 13, 2022, 12:10pm UTC](https://discuss.elastic.co/t/monitor-kafka-using-kafka-module-from-metricbeat/314291/2 "2022-09-13T12:10:09Z")

</div>

Hi,

I have got the solution, I just commented the _" ssl.certificate\_authorities: ["/etc/metricbeat/certs/kafka\_ca.crt"]"_  
the line and my code started working.

Thanks,  
Tahseen

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 11, 2022, 2:10pm UTC](https://discuss.elastic.co/t/monitor-kafka-using-kafka-module-from-metricbeat/314291/3 "2022-10-11T14:10:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
