源码地址https://github.com/smartloli/kafka-eagle
下载地址https://github.com/smartloli/kafka-eagle/releases
作者比较懒,都是源码,需要自己下载下来编译
先下载源码,然后修改下pom文件,指定一下jdk,不然会报编译错误
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
然后执行
./build.sh
执行成功后,进入到kafka-eagle-web/target下面,有个kafka-eagle-web-1.1.9-bin.tar.gz
将这个包,拷到任意目录解压,得到一个kafka-eagle-web-1.1.9文件夹,然后在环境变量里加入一个KE_HOME的变量,指向到解压出来的目录。
接着进入到sql目录下,找到一个sql,执行sql后,找到conf下得system-config.properties 编辑他
######################################
# multi zookeeper&kafka cluster list
######################################
kafka.eagle.zk.cluster.alias=cluster1,cluster2
cluster1.zk.list=tdn1:2181,tdn2:2181,tdn3:2181
cluster2.zk.list=xdn10:2181,xdn11:2181,xdn12:2181
######################################
# zk client thread limit
######################################
kafka.zk.limit.size=25
######################################
# kafka eagle webui port
######################################
kafka.eagle.webui.port=8048
######################################
# kafka offset storage
######################################
kafka.eagle.offset.storage=kafka
######################################
# alarm email configure
######################################
kafka.eagle.mail.enable=true
kafka.eagle.mail.sa=alert_sa
kafka.eagle.mail.username=alert_sa@163.com
kafka.eagle.mail.password=mqslimczkdqabbbg
kafka.eagle.mail.server.host=smtp.163.com
kafka.eagle.mail.server.port=25
######################################
# delete kafka topic token
######################################
kafka.eagle.topic.token=keadmin
######################################
# kafka sasl authenticate
######################################
kafka.eagle.sasl.enable=false
kafka.eagle.sasl.protocol=SASL_PLAINTEXT
kafka.eagle.sasl.mechanism=PLAIN
kafka.eagle.sasl.client=/hadoop/kafka-eagle/conf/kafka_client_jaas.conf
######################################
# kafka jdbc driver address
######################################
kafka.eagle.driver=com.mysql.jdbc.Driver
kafka.eagle.url=jdbc:mysql://127.0.0.1:3306/ke?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
kafka.eagle.username=root
kafka.eagle.password=smartloli
保存后,进入bin目录下,执行
./ke.sh start
当看到
*******************************************************************
* Kafka Eagle system monitor port successful... *
*******************************************************************
Status Code[0]
[Job done!]
*******************************************************************
* KE Service has started success! *
* Welcome, Now you can visit 'http://<your_host_or_ip>:port/ke' *
* Account:admin ,Password:123456 *
*******************************************************************
* <Usage> ke.sh [start|status|stop|restart|stats] </Usage> *
*******************************************************************
表示启动成功