-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yet another example Kafka client configs #413
Conversation
Signed-off-by: Liam Clarke <liam.clarke@adscale.co.nz>
73e2694
to
30f0563
Compare
Signed-off-by: Liam Clarke <liam.clarke@adscale.co.nz>
The same comments apply here are in #305, KafkaMetricsReporter would be a better approach. |
@brian-brazil That's true where it's possible to do so. But a problem child of ours is Logstash, and it doesn't expose the ability to configure a metrics reporter for its consumers. In this instance, using the Java agent is the perfect solution. |
In that case I'd be looking to provide a config for logstash, not kafka client. |
It is a config for Logstash - the client config above is being used to export metrics for the Kafka client being used internally by Logstash. |
I'm not seeing any logstash mBeans there. |
Hi Brian, Logstash uses the kafka-client consumers to consume from Kafka and write to (in our case) ES, the Kafka consumers instantiated within Logstash register the metric MBeans I'm interested in to understand how Logstash is interacting with Kafka, so the configuration has to specify those metric mbeans. |
But this still isn't a logstash configuration. https://www.elastic.co/guide/en/logstash/current/monitoring-logstash.html#monitoring sounds like what you're looking for. |
Thanks @brian-brazil, Unfortunately, the Logstash monitoring APIs do not expose specific Kafka consumer metrics that are highly relevant for diagnosing issues. Here's an example of the Kafka plugin metrics exposed by Logstash:
However, for diagnosing problems with the Logstash consumers and how they interact with the Kafka cluster, metrics such as |
That sounds like a feature request to Logstash then. |
Hello, LiamClarkeNZ @LiamClarkeNZ |
Kia ora @brzyangg, sorry for the very late reply - I hope you managed to resolve your issues :) |
@fstab @tomwilkie do you think using JMX exporter to monitor kafka client is worthwhile having as an example? If so, I can revisit it to ensure it works for Kafka 2.8 and 3.0, otherwise I'll close the PR :) It is an older use case now that Micrometer can export Kafka client metrics via Prometheus nicely, but I found value in it monitoring apps I couldn't easily change the code of. |
@brian-brazil Two configurations I've deployed in production to capture essential (as recommended by the O'Reilly book's chapter on monitoring producers and consumers. Hopefully I got the metric names correct by Prometheus best practices, it's all quite new to me.