一、监控作用
1)用于zookeeper写日志的目录要有足够大小,并且强烈建议在单独的磁盘(挂载点)上,这是影响ZK性能最大因素之一。
二、安装过程:
1、下载
wget http://apache.fayea.com/tomcat/tomcat-7/v7.0.69/bin/apache-tomcat-7.0.69.zip
wget https://github.com/alibaba/taokeeper/blob/release/release/taokeeper-monitor.tar.gz
2、解压
unzip apache-tomcat-7.0.69.zip
mv apache-tomcat-7.0.69 tomcat7
tar -xvf taokeeper-monitor.tar.gz
mv taokeeper-monitor tomcat7/webapps/
3、配置
1.)下载taokeeper.sql,初始化数据库(MySQL).
下载 taokeeper-monitor-config.properties文件,存放到一个指定目录,比如
/opt/bigdata/tomcat7/webapps/taokeeper-monitor/config/taokeeper-monitor-config.properties, 其中内容如下,根据需要自己修改下。
----------------------------------------------------------------
systemInfo.envName=TEST
#DBCP
dbcp.driverClassName=com.mysql.jdbc.Driver
dbcp.dbJDBCUrl=jdbc:mysql://192.168.1.102:3306/taokeeper
dbcp.characterEncoding=GBK
dbcp.username=root
dbcp.password=123
dbcp.maxActive=30
dbcp.maxIdle=10
dbcp.maxWait=10000
#SystemConstant
SystemConstent.dataStoreBasePath=/opt/bigdata/tomcat7/webapps/taokeeper-monitor/ZookeeperStore
#SSH account of zk server
SystemConstant.userNameOfSSH=root
SystemConstant.passwordOfSSH=111111
2)修改tomcat启动脚本
# vim /usr/local/tomcat/bin/catalina.sh 增加
JAVA_OPTS=-DconfigFilePath="/opt/bigdata/tomcat7/webapps/taokeeper-monitor/config/taokeeper-monitor-config.properties"
三、启动zookeeper,mysql,tomcat 验证