安装kafka_exporter集群监控

安装kafka集群监控

安装步骤
[root@gtcq-gt-resource2-db-01 opt]# cd /opt/ ;scp [email protected]:/opt/kafka* /opt
[email protected]'s password: 
kafka_exporter-1.2.0.linux-amd64.tar.gz                                                                                    100% 4129KB  84.1MB/s   00:00    
[root@gtcq-gt-resource2-db-01 opt]# tar -zxvf kafka_exporter-1.2.0.linux-amd64.tar.gz  -C /usr/local/
[root@gtcq-gt-resource2-db-01 local]# cd kafka_exporter-1.2.0.linux-amd64/
[root@gtcq-gt-resource2-db-01 kafka_exporter-1.2.0.linux-amd64]#  ./kafka_exporter --kafka.server=10.152.17.50:9092 &
[13] 46697
[root@gtcq-gt-resource2-db-01 kafka_exporter-1.2.0.linux-amd64]# INFO[0000] Starting kafka_exporter (version=1.2.0, branch=HEAD, revision=830660212e6c109e69dcb1cb58f5159fe3b38903)  source="kafka_exporter.go:474"
INFO[0000] Build context (go=go1.10.3, user=root@981cde178ac4, date=20180707-14:34:48)  source="kafka_exporter.go:475"
INFO[0000] Done Init Clients                             source="kafka_exporter.go:213"
INFO[0000] Listening on :9308                            source="kafka_exporter.go:499"

[root@gtcq-gt-resource2-db-01 kafka_exporter-1.2.0.linux-amd64]#

对应的服务端口为9308

修改Prometheus配置文件
  ##kafka监控  
  - job_name: 'job-gtcq-gt-kafka'
    static_configs:
    - targets: ['10.152.17.50:9308']
      labels:
        service: gtcq-gt-kafka-service 
展示


参考

猜你喜欢

转载自blog.csdn.net/qq_31555951/article/details/109130023