【Kibana】Docker安装部署Kibana连接ES

版本:
CentOS 8
ElasticSearch 7.9.2
Kibana 7.9.2
Docker 19.03.13

ES的几个主要配置(可忽略)

	image: docker.elastic.co/elasticsearch/elasticsearch:7.9.2
	ports:
      - 9200:9200
	networks:
      - elastic
networks:
  elastic:
    driver: bridge

完整配置见:https://blog.csdn.net/m0_51929611/article/details/109291889

Docker-Compose

version: "3"
services:
  kibana:
    image: docker.elastic.co/kibana/kibana:7.9.2
    container_name: kibana
    environment:
      ELASTICSEARCH_HOSTS: http://192.168.56.200:9200
    volumes:
      - ./kibana.yml:/usr/share/kibana/config/kibana.yml
    ports:
      - 5601:5601
    networks:
      - elastic
networks:
  elastic:
    driver: bridge

Kibana.yml

server.name: kibana
server.host: "0.0.0.0"
elasticsearch.hosts: [ "http://192.168.56.200:9200" ]
xpack.monitoring.ui.container.elasticsearch.enabled: true

填坑指南

  • 坑1:Unable to revive connection: http://192.168.56.200:9800/
  • 坑2:kibana页面无法打开,提示docker kibana Kibana server is not ready yet
  • 坑3:容器内curl提示No route to host
    1、关闭防火墙
    systemctl stop firewalld
    或在防火墙上打开指定端口
    firewall-cmd --zone=public --add-port=2181/tcp --permanent
    firewall-cmd --reload

2、桥接Docker网络,该配置已经写在了compose中。

3、如果还不行,试着重启一下docker。 service docker restart

©️2020 CSDN 皮肤主题: 1024 设计师:上身试试 返回首页