简体   繁体   English

如何以JSON格式获取Apache Kafka指标

[英]How to get Apache Kafka metrics in JSON format

I'm trying to get Apache Kafka health metrics such as Broker, Producer, Consumer, Zookeeper, Topics, etc. metrics without using Confluent or any other software/plugin. 我试图在不使用Confluent或任何其他软件/插件的情况下获取诸如代理,生产者,消费者,Zookeeper,主题等Apache Kafka的健康指标。

I need to expose these and store them in Elasticsearch. 我需要公开这些并将它们存储在Elasticsearch中。 So far not able to extract this info. 到目前为止,尚无法提取此信息。 Any pointers on how I can extract this information from a running Apache Kafka docker container? 关于如何从正在运行的Apache Kafka docker容器中提取此信息的任何指示?

As @Seyed Morteza Mousavi says, the metrics are exposed through JMX. 正如@Seyed Morteza Mousavi所说,这些度量是通过JMX公开的。

You're going to need additional software/plugin to get the data though. 不过,您将需要其他软件/插件来获取数据。 If you're using Elasticsearch then within the same stack is Beats which can stream JMX metrics to Elasticsearch directly. 如果您使用的是Elasticsearch,则Beats可以位于同一堆栈中,它可以直接将JMX指标流式传输到Elasticsearch。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM