Kafka监控
程序员文章站
2024-03-08 10:46:04
...
KafkaOffsetMonitor是一个可以用于监控Kafka的Topic及Consumer消费状况的工具,其配置和使用特别的方便。源项目Github地址为:地址
下载KafkaOffsetMonitor-assembly-0.2.1.jar
,然后ftp到kafka服务器10.242.167.216上
cd /opt/kafka
编写启动脚本:
vim monitor-kafka.sh
#!/usr/bin/env bash
java -cp KafkaOffsetMonitor-assembly-0.2.1.jar \
com.quantifind.kafka.offsetapp.OffsetGetterWeb \
--zk dbmspreapp212:2181,dbmspreapp211:2181,dbmspreapp210:2181,dbmspreapp209:2181,dbmspreapp208:2181 \
--port 9099 \
--refresh 5.seconds \
--retain 1.days
chmod +x monitor-kafka.sh
nohup ./monitor-kafka.sh &
serving resources from: jar:file:/opt/kafka/KafkaOffsetMonitor-assembly-0.2.1.jar!/offsetapp
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
log4j:WARN No appenders could be found for logger (org.I0Itec.zkclient.ZkEventThread).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
log4j:WARN No appenders could be found for logger (org.I0Itec.zkclient.ZkConnection).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
2018-02-11 13:46:39.964:INFO:oejs.Server:jetty-7.x.y-SNAPSHOT
2018-02-11 13:46:39.990:INFO:oejsh.ContextHandler:started o.e.j.s.ServletContextHandler{/,jar:file:/opt/kafka/KafkaOffsetMonitor-assembly-0.2.1.jar!/offsetapp}
2018-02-11 13:46:39.995:INFO:oejs.AbstractConnector:Started SocketConnector@0.0.0.0:9099
访问http://10.242.167.216:9099
上一篇: 讯为ITop-4412问题一:fastboot烧写相关
下一篇: Hibernate缓存详解