V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Andydufresneguoh
V2EX  ›  Elasticsearch

在多台机器上用 docker 搭建 elasticseach,每台机器上一个。然后能用 kibana 监控他们,这算集群吗?可不可行?

  •  
  •   Andydufresneguoh · 2022-02-12 16:47:13 +08:00 · 2251 次点击
    这是一个创建于 797 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我在 231 和 184 服务器上使用 docker-compose 分别搭建一个 es 容器,想在另一个机器上搭建一个 kibana ,然后通过在 kibana.yml 中配置 elasticsearch.hosts,通过两个服务的 ip 和 es 的端口让 kibana 去访问它们,请问这样我是否能够实现让 kibana 监控多个机器上的 es 服务,这样搭建的服务算不算一个集群?如果可以实现有哪些配置和地方要注意呢。 elasticsearch.hosts: [ "http://172.20.43.231:9200","http://172.20.43.184:9200" ]

    7 条回复    2022-02-14 17:25:08 +08:00
    haokuderen
        1
    haokuderen  
       2022-02-12 16:57:33 +08:00
    访问 elasticsearch-head 界面看一眼不就知道了
    liuhuansir
        2
    liuhuansir  
       2022-02-12 16:57:54 +08:00
    es 集群跟 kibana 没啥关系吧,只要 es 配置适当,能查询出多个 es 节点,那就是 es 集群
    Andydufresneguoh
        3
    Andydufresneguoh  
    OP
       2022-02-12 17:03:22 +08:00
    elasticsearch.hosts:

    The URLs of the Elasticsearch instances to use for all your queries. All nodes listed here must be on the same cluster. Default: [ "http://localhost:9200" ]

    To enable SSL/TLS for outbound connections to Elasticsearch, use the https protocol in this setting.
    官方文档上写着这个配置下写的所有节点必须要在同一个集群( All nodes listed here must be on the same cluster.),这是不是说明我这个不行?因为使用 docker-compose 在不同机器上部署的 es 应该不算同一个集群吧?
    @haokuderen @
    swulling
        4
    swulling  
       2022-02-12 17:29:55 +08:00
    @Andydufresneguoh 如果你只是简单的在不同机器上启动 ES ,那肯定不是集群,需要根据官方文档 join 一下
    ltkun
        5
    ltkun  
       2022-02-12 17:35:36 +08:00 via Android
    docker 不是自带集群么 虽然功能弱鸡了点
    changhai
        6
    changhai  
       2022-02-12 18:13:43 +08:00
    先弄个 k8s ,如果不会弄,可以用 rancher
    然后,再建一个 es cluster 就方便多了
    Andydufresneguoh
        7
    Andydufresneguoh  
    OP
       2022-02-14 17:25:08 +08:00
    @liuhuansir @swulling 确实在不同设备上把 es 配置好了 join 一起就可以
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2622 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 01:48 · PVG 09:48 · LAX 18:48 · JFK 21:48
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.