Apache kafka 监控卡夫卡集群、生产者和消费者

Apache kafka 监控卡夫卡集群、生产者和消费者,apache-kafka,kafka-consumer-api,kafka-producer-api,Apache Kafka,Kafka Consumer Api,Kafka Producer Api,我是Kafka新手,我有三个节点Kafka群集,其中包含多个使用者和生产者。我希望根据三个参数监控Kafka群集: 1.Topic wise monitoring - to get incoming rate of topic , lag in a topic, number of active consumers attached with the topic, number of partitions 2.Consumer based monitoring - the topic from

我是Kafka新手,我有三个节点Kafka群集,其中包含多个使用者和生产者。我希望根据三个参数监控Kafka群集:

1.Topic wise monitoring - to get incoming rate of topic , lag in a topic, number of active consumers attached with the topic, number of partitions
2.Consumer based monitoring - the topic from which it is consuming,consumption speed. a number of messages consumed.
3.Message-Based Monitoring - topic name in which message is produced,and status of message i.e whether it's processed or pending.

我尝试过各种监视工具,如(KafkaOffsetMonitor、Burrow)但是没有一个与我的用例相匹配。那么,有人能建议如何设置这种监视系统吗?有没有API可以让我获得上述详细信息

您可以启动JConsole并在配置了JMX的情况下监视整个Kafka集群。有关详细信息,请参阅。

我们使用两种方法

  • 报告给使用的JMX度量,并使用可视化

  • 消费者延迟监控使用,并报告给XDB使用


看看这篇文章,大部分关于监控卡夫卡的工具和文章都在这里进行了总结。

Hi amethystic,谢谢你的回复,但我想把统计数据存储在某个地方,以便将来可以参考,比如需要运行多少消费者或生产者。那么,我能做些什么来存储统计数据呢?是否有一些API提供了通过Jconsole可见的所有信息?您必须实现自己的reporter类,该类实现KafkametricsReporterBean接口。Kafka附带一个名为KafkaCSVMetricsReporter的预构建报告器,它无法将所有度量写入给定的csv文件。