
cerebro监控ES集群工具
1.简介
在功能上cerebro支持节点状态监控 服务器 磁盘空间,cpu,load,索引数量大小 ,数据分布位置等监控。 支持查询
2.安装
安装,首先要有java环境
[root@opsxdev ~]#wget https://github.com/lmenezes/cerebro/releases/download/v0.9.3/cerebro-0.9.3.zip -O cerebro-0.9.3.zip [root@opsxdev ~]#unzip cerebro-0.9.3.zip [root@opsxdev ~]# mv cerebro-0.9.3 /usr/share/ [root@opsxdev ~]# ls /usr/share/cerebro-0.9.3/ [root@opsxdev ~]# ln -s /usr/share/cerebro-0.9.3/bin/cerebro /usr/local/bin/cerebro [root@opsxdev ~]# mkdir -p /data/cerebro/log/启动服务
cerebro -DCEREBRO_PORT=8080 >> /data/cerebro/log/runtime.log &加入systemctl管理
cat>/usr/lib/systemd/system/cerebro.service<<EOF [Unit] Description=Cerebro 0.9.3 Dashboard After=network.target [Service] PIDFile=/var/run/cerebro.pid ExecStart=/usr/share/cerebro/bin/cerebro -Dhttp.port=8080 -Dhttp.address=0.0.0.0 -Dconfig.file=/usr/share/cerebro/conf/application.conf Restart=on-failure PrivateTmp=true [Install] WantedBy=multi启动服务
systemctl daemon-reload; systemctl enable cerebro; systemctl start cerebro; systemctl status cerebro;
3.配置服务器
非必须:如果经常使用的话,可以先在
conf/application.conf中配置好ElasticSearch服务器地址hosts = [ { host = "http://localhost:9200" name = "Some Cluster" }, # Example of host with authentication #{ # host = "http://some-authenticated-host:9200" # name = "Secured Cluster" # auth = { # username = "username" # password = "secret-password" # } #} ]