1.监控脚本如下:check_zookeeper.sh

#!/bin/bashecho mntr | nc 127.0.0.1 2182 | grep "$1" |awk '{print $2}'

2.编辑zabbix_agentd.conf

#Monitor zookeeperUserParameter=zookeeper[*],/usr/bin/sh    /etc/zabbix/scripts/check_zookeeper.sh  $1

3.编辑item

4.或者上传附件模板