
8

快速部署cerebro-v0.9.4监控es集群状态
source link: http://www.eryajf.net/5377.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

快速部署cerebro-v0.9.4监控es集群状态 |坐而言不如起而行! 二丫讲梵

本文预计阅读时间 3 分钟
使用docker-compose进行部署。
$ cat docker-compose.yml
version: '2'
services:
cerebro:
image: registry.cn-hangzhou.aliyuncs.com/eryajf/cerebro:v0.9.4
container_name: cerebro
volumes:
- ./conf:/opt/cerebro/conf
restart: always
ports:
- "80:9000"
其中的conf目录可以下载源码仓库中的conf目录进行编辑。
重要的配置文件是 conf/application.conf
,我们可以通过编辑此文件,实现对日常监控集群的常驻添加:
$ git clone https://github.com/lmenezes/cerebro.git
$ mv cerebro/conf ./
编辑对应配置文件:
$ tail -22 conf/application.conf
# A list of known hosts
hosts = [
{
host = "http://10.1.1.1:9200"
name = "test-6.5.4"
# headers-whitelist = [ "x-proxy-user", "x-proxy-roles", "X-Forwarded-For" ]
}
{
host = "http://10.1.1.2:9200"
name = "test-7.7.1"
# headers-whitelist = [ "x-proxy-user", "x-proxy-roles", "X-Forwarded-For" ]
}
# Example of host with authentication
#{
# host = "http://some-authenticated-host:9200"
# name = "Secured Cluster"
# auth = {
# username = "username"
# password = "secret-password"
# }
#}
]
启动服务:
$ docker-compose up -d
然后可以在页面上看到对应的记录:

二丫讲梵 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明快速部署cerebro-v0.9.4监控es集群状态!
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK