代码之家  ›  专栏  ›  技术社区  ›  swagrov

我如何在kafka jmx度量中观察responsesendtimes和consumerlag

  •  0
  • swagrov  · 技术社区  · 5 年前

    在Kafka代理上,我可以很好地运行此命令:

    ./kafka-run-class.sh kafka.tools.JmxTool --object-name kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec

    但是这些命令失败了,因为“查询对象没有匹配的属性”

    ./kafka-run-class.sh kafka.tools.JmxTool --object-name 'kafka.server:type=FetcherLagMetrics,name=ConsumerLag,clientId=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)'

    ./kafka-run-class.sh kafka.tools.JmxTool --object-name "kafka.network:type=RequestMetrics,name=ResponseSendTimeMs,request={Produce|FetchConsumer|FetchFollower}"

    ./kafka-run-class.sh kafka.tools.JmxTool --object-name "kafka.network:type=RequestMetrics,name=RequestsPerSec,request=FetchFollower"

    如何收集这些指标?

    卡夫卡2.2.0版

    0 回复  |  直到 5 年前