# Unable to setup kafka with metricbeat

**URL:** https://discuss.elastic.co/t/unable-to-setup-kafka-with-metricbeat/354210
**Category:** Beats
**Tags:** metricbeat
**Created:** [February 27, 2024, 10:02am UTC](https://discuss.elastic.co/t/unable-to-setup-kafka-with-metricbeat/354210 "2024-02-27T10:02:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kriti\_dabas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kriti_dabas/32/118506_2.png) [@kriti\_dabas](https://discuss.elastic.co/u/kriti_dabas)
#### Post date: [February 27, 2024, 10:02am UTC](https://discuss.elastic.co/t/unable-to-setup-kafka-with-metricbeat/354210/1 "2024-02-27T10:02:03Z")

</div>

metricbeat.yml

```auto
path: ${path.config}/modules.d/*.yml
reload.enabled: true
setup.kibana:
host: "https://#.#.#.#:443"  
protocol: "https"  
ssl.verification_mode: none 
output.elasticsearch: hosts: ["https://ec1:9200","https://ec2:9200"] ssl.certificate_authorities: ["/etc/elasticsearch/certs/ca/ca.crt"]
username: “***“
password: “***"
processors: - add_host_metadata: ~
logging.level: info
     logging.selectors: ["*"]
     logging.to_files: true
     logging.files: 
     path: /var/log/metricbeat 
     name: metricbeat 
     keepfiles: 1  
     permissions: 0644

```

kafka.yml

```auto
- module: kafka
  metricsets:
    - partition
    - consumergroup
    - broker
  enabled: true
  period: 10s
  hosts: ["kafka1:9092","kafka2:9092","kafka3:9092"]

```

 ![Screenshot (17)](https://us1.discourse-cdn.com/elastic/original/3X/8/e/8e97b1308b38068164f83b5a341520c586c19bcd.png)

```auto
systemctl daemon-reload
systemctl enable metricbeat
systemctl start metricbeat                
metricbeat setup –e (loading dashboards on kibana)

```

Only two brokers are displayed in kafka dashboard there should be three brokers.  
whereas in observability there are three kafka shown

 ![Screenshot (18)](https://us1.discourse-cdn.com/elastic/original/3X/b/c/bca31bcb56517bbebf3538b3c68a10778b1f82c0.png)

---

<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: [March 26, 2024, 12:02pm UTC](https://discuss.elastic.co/t/unable-to-setup-kafka-with-metricbeat/354210/2 "2024-03-26T12:02:47Z")

</div>

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