# Monitor output kafka on telegraf

**URL:** https://community.influxdata.com/t/monitor-output-kafka-on-telegraf/57916
**Category:** Telegraf
**Tags:** telegraf, prometheus, grafana, performance
**Created:** [September 8, 2025, 3:30am UTC](https://community.influxdata.com/t/monitor-output-kafka-on-telegraf/57916 "2025-09-08T03:30:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![thititongumpun](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/thititongumpun/32/20133_2.png) [@thititongumpun](https://community.influxdata.com/u/thititongumpun)
#### Post date: [September 8, 2025, 3:30am UTC](https://community.influxdata.com/t/monitor-output-kafka-on-telegraf/57916/1 "2025-09-08T03:30:44Z")

</div>

i have some questions to ask you about monitoring telegraf. Right now i use outputs.kafka plugins for produce data that read from influxdb2 to a Kafka broker and i want some metrics such as batch size, [linger.ms](http://linger.ms/) to monitor the producer performance how can i export this metrics from this telegraf instance. Thank you very much.

---

<div class="post-metadata">

### Author: ![srebhan](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/srebhan/32/8572_2.png) [@srebhan](https://community.influxdata.com/u/srebhan)
#### Post date: [September 8, 2025, 7:43am UTC](https://community.influxdata.com/t/monitor-output-kafka-on-telegraf/57916/2 "2025-09-08T07:43:04Z")

</div>

Hey @thititongumpun!

Sorry I’m not sure I fully understand what you are after… Do you want to get metrics about the Telegraf instance and send it to Kafka? If so, did you take a look at the [internal input plugin](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/internal)? I believe we don’t export the batch-size as this is a static configuration parameter so it doesn’t make sense to send it over and over to a sink as it will never change for the running instance…

Does that help?

---

<div class="post-metadata">

### Author: ![thititongumpun](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/thititongumpun/32/20133_2.png) [@thititongumpun](https://community.influxdata.com/u/thititongumpun)
#### Post date: [September 9, 2025, 2:48am UTC](https://community.influxdata.com/t/monitor-output-kafka-on-telegraf/57916/3 "2025-09-09T02:48:09Z")

</div>

> [@srebhan](#):
>
> Sorry I’m not sure I fully understand what you are after… Do you want to get metrics about the Telegraf instance and send it to Kafka? If so, did you take a look at the [internal input plugin](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/internal)? I believe we don’t export the batch-size as this is a static configuration parameter so it doesn’t make sense to send it over and over to a sink as it will never change for the running instance…
> 
> Does that help?

Thanks for answer.

What I meant is that I’m using the **Kafka output** , which means it’s essentially a Kafka producer. Is there any way to monitor the producer itself, for example metrics like `client.id`, `batch size`, or even JMX/Jolokia metrics from the producer side, and then collect them into Prometheus/Grafana?

Right now I can monitor the **Telegraf instance** itself, but I’d like to also monitor the Kafka producer.
