8

快速部署cerebro-v0.9.4监控es集群状态

 3 years ago
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.
neoserver,ios ssh client
快速部署cerebro-v0.9.4监控es集群状态 |坐而言不如起而行! 二丫讲梵
> 日志管理 > ELK > 快速部署cerebro-v0.9.4监控es集群状态
本文预计阅读时间 3 分钟

使用docker-compose进行部署。

  1. $ cat docker-compose.yml
  2. version: '2'
  3. services:
  4. cerebro:
  5. image: registry.cn-hangzhou.aliyuncs.com/eryajf/cerebro:v0.9.4
  6. container_name: cerebro
  7. volumes:
  8. - ./conf:/opt/cerebro/conf
  9. restart: always
  10. ports:
  11. - "80:9000"

其中的conf目录可以下载源码仓库中的conf目录进行编辑。

重要的配置文件是 conf/application.conf,我们可以通过编辑此文件,实现对日常监控集群的常驻添加:

  1. $ git clone https://github.com/lmenezes/cerebro.git
  2. $ mv cerebro/conf ./

编辑对应配置文件:

  1. $ tail -22 conf/application.conf
  2. # A list of known hosts
  3. hosts = [
  4. {
  5. host = "http://10.1.1.1:9200"
  6. name = "test-6.5.4"
  7. # headers-whitelist = [ "x-proxy-user", "x-proxy-roles", "X-Forwarded-For" ]
  8. }
  9. {
  10. host = "http://10.1.1.2:9200"
  11. name = "test-7.7.1"
  12. # headers-whitelist = [ "x-proxy-user", "x-proxy-roles", "X-Forwarded-For" ]
  13. }
  14. # Example of host with authentication
  15. #{
  16. # host = "http://some-authenticated-host:9200"
  17. # name = "Secured Cluster"
  18. # auth = {
  19. # username = "username"
  20. # password = "secret-password"
  21. # }
  22. #}
  23. ]

启动服务:

  1. $ docker-compose up -d

然后可以在页面上看到对应的记录:

image-20210501113517239


weinxin

二丫讲梵 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明快速部署cerebro-v0.9.4监控es集群状态

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK