我正在尝试在 stackdriver 上设置 kafka 指标。我按照https://cloud.google.com/monitoring/agent/plugins/kafka,但仍然看不到“kafka”指标。虽然我可以看到 Host、Agent、Zookeeper 和 JVM 的指标
我还可以从 kafka 的脚本中看到这些指标:bin/kafka-run-class.sh kafka.tools.JmxTool --object-name 'kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec' --jmx-url service:jmx:rmi:///jndi/rmi://localhost:9 999/jmxrmi
上述脚本的结果:"time","kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec:Count","kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec:EventType","kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec:FifteenMin uteRate","kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec:FiveMinuteRate","kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec:MeanRate","kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec: OneMinuteRate","kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec:RateUnit" 1546947405966,0,messages,0.0,0.0,0.0,0.0,SECONDS 1546947407959,0,messages,0.0,0.0,0.0,0.0,SECONDS 1546947409963,0,messages,0.0,0.0,0.0,0.0,SECONDS
答案1
检查 stackdriver 中的自定义指标选项卡,Kafka 指标已加载到其中