# Kafka consumer lag?

**URL:** <https://discuss.elastic.co/t/kafka-consumer-lag/163884>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [January 11, 2019, 10:45am UTC](https://discuss.elastic.co/t/kafka-consumer-lag/163884 "2019-01-11T10:45:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimWard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timward/32/19574_2.png) [@TimWard](https://discuss.elastic.co/u/TimWard)\
**Post date:** [January 11, 2019, 10:45am UTC](https://discuss.elastic.co/t/kafka-consumer-lag/163884/1 "2019-01-11T10:45:54Z")

</div>

I'd somehow got the idea that Metricbeat 6.5 might enable the monitoring of Kafka consumer lag, but on trying it I see that the latest offset is still only in the partition event and the consumer group offset is still only in the consumergroup record, so this still can't be done?

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [January 16, 2019, 10:45am UTC](https://discuss.elastic.co/t/kafka-consumer-lag/163884/2 "2019-01-16T10:45:34Z")

</div>

Hi @TimWard,

In 6.5 we added some fields that help on corelation of events between different Kafka metricsets, this helps on calculating the consumer lag on query/visualization time.  
We also added a dashboard that includes a visualization for that, see [#8457](https://github.com/elastic/beats/pull/8457).

It'd be great if you could try the dashboard and give us feedback 🙂

Thanks for your interest!

---

<div class="post-metadata">

**Author:** ![TimWard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timward/32/19574_2.png) [@TimWard](https://discuss.elastic.co/u/TimWard)\
**Post date:** [January 16, 2019, 11:00am UTC](https://discuss.elastic.co/t/kafka-consumer-lag/163884/3 "2019-01-16T11:00:17Z")

</div>

Thanks. What do I actually have to do to "try this dashboard"? - I'm not aware of any way of correlating fields between different sets of documents.

(I'm currently calculating lag by parsing the output from kafka-consumer-groups.sh which is horrible for pretty well every reason imaginable.)

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [January 16, 2019, 11:59am UTC](https://discuss.elastic.co/t/kafka-consumer-lag/163884/4 "2019-01-16T11:59:54Z")

</div>

> [@TimWard](#):
>
> What do I actually have to do to "try this dashboard"?

Just install the dashboard in kibana and try it with your data 🙂

If you are not using any of the dashboards provided by metricbeat yet, take a look to the [setup guide](https://www.elastic.co/guide/en/beats/metricbeat/current/load-kibana-dashboards.html). Even if you don't use them directly they can be used as examples or as a starting point for your own custom dashboards.

If you are using kafka in production it'd be helpful to know if the info provided in the dashboard makes sense when compared to other tools like the scripts provided by kafka.

---

<div class="post-metadata">

**Author:** ![TimWard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timward/32/19574_2.png) [@TimWard](https://discuss.elastic.co/u/TimWard)\
**Post date:** [January 17, 2019, 10:49am UTC](https://discuss.elastic.co/t/kafka-consumer-lag/163884/5 "2019-01-17T10:49:59Z")

</div>

Ta. I'll give that a try next time I need to upgrade what I'm already getting by parsing the script output, which is good enough for now.

---

<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:** [February 14, 2019, 10:50am UTC](https://discuss.elastic.co/t/kafka-consumer-lag/163884/6 "2019-02-14T10:50:04Z")

</div>

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