首先需要go的环境
go的版本是14.5
jq需要安装一下
apt-get install jq
目录结构如下
/soft/Burrow/ /soft/go/ /soft/kafka_exporter /etc/zabbix/zabbix_scripts/kafka
go的全局变量设置
/etc/profile export GOROOT=/soft/go export GOPATH=/data/go export PATH=$PATH:$GOROOT/bin
Burrow的安装
cd /data/go go get github.com/linkedin/Burrow /soft/go/work/pkg/mod/github.com/linkedin/burrow@v1.3.4/ /soft/go/bin/go install
配置supervisor的服务管理
pip install supervisor echo_supervisord_conf > /etc/supervisord.conf mkdir /etc/supervisord
#vim /etc/supervisord.conf [include] files = /etc/supervisord/*.conf
# cat /etc/supervisord/Burrow.conf [program:Burrow] command = /data/go/bin/Burrow --config-dir /soft/Burrow directory = /data/go/bin/ process_name = %(program_name)s_%(process_num)s numprocs = 1 autorestart = true startsecs = 1 stdout_logfile_maxbytes = 50MB stdout_logfile_backups = 20 stdout_logfile = /var/log/Burrow.log stderr_logfile = /var/log/Burrow_error.log
# cat /etc/supervisord/kafka_exporter.conf [program:kafka_exporter] command = /soft/kafka_exporter/kafka_exporter --kafka.server=172.28.2.71:9092 #172.28.2.71 kafka server的地址kafkaf directory = /soft/kafka_exporter/ process_name = %(program_name)s_%(process_num)s numprocs = 1 autorestart = true startsecs = 1 stdout_logfile_maxbytes = 50MB stdout_logfile_backups = 20 stdout_logfile = /var/log/kafka_exporter.log stderr_logfile = /var/log/kafka_exporter.log
zabbix的kafka的配置文件
# cat userparameter_kafkaconsumer.conf UserParameter=kafkaconsumer[*], /bin/bash /etc/zabbix/zabbix_scripts/kafka/kafka_consumers.sh
文件的压缩包的地址参考 链接: https://pan.baidu.com/s/17LdzXe2Ht4y-1HsKijvOGA 提取码: fie4
zabbix的模板文件 链接: https://pan.baidu.com/s/1naxW8lYCdKILvnAFmoHb7Q 提取码: z29v
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)