How to monitor messages rate in kafka topics?

混江龙づ霸主 提交于 2019-12-10 17:29:33

问题


How can I get alerted when there is a message rate in some topic higher or lower than usual?


回答1:


Kafka emits tons of metrics that allow to monitor its usage and health. This includes metrics for incoming message rate, see the Monitoring section in the docs.

Your use case is typically achieved with a tool that handles metrics and is able to fire alerts based on user defined queries.

For example, Prometheus handles that very well. You need to set it up so metrics from Kafka are forwarded to Prometheus (using https://github.com/prometheus/jmx_exporter). As it's a very common use case, you'll find hundreds of articles online that describe how to set that up. The JMX exporter has sample configs for the Kafka JMX patterns, as well.

Once the metrics are in Prometheus you can aggregate them across brokers and set up Alerts.



来源:https://stackoverflow.com/questions/54168657/how-to-monitor-messages-rate-in-kafka-topics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!