ElasticSearch-kibana安装
1.docker拉取kibana镜像
docker pull kibana:7.10.1
2.启动容器
docker run --name kibana -d -p 5601:5601 kibana:7.10.1
此时容器启动成功,但是页面访问 http://IP:5601/ 会提示错误:[Kibana server is not ready yet]
查看容器日志,显示
{"type":"log","@timestamp":"2021-01-16T03:10:31Z","tags":["error","elasticsearch","data"],"pid":6,"message":"[ConnectionError]: getaddrinfo ENOTFOUND elasticsearch elasticsearch:9200"} {"type":"log","@timestamp":"2021-01-16T03:10:33Z","tags":["warning","elasticsearch","monitoring"],"pid":6,"message":"Unable to revive connection: http://elasticsearch:9200/"}
3.修改kibana配置
root@ryj-dev10:/home/wuh151# docker container exec -it 592f35773efc sh sh-4.4$ ls LICENSE.txt NOTICE.txt README.txt bin config data node node_modules package.json plugins src x-pack sh-4.4$ cat config/kibana.yml # # ** THIS IS AN AUTO-GENERATED FILE ** # # Default Kibana configuration for docker target server.name: kibana server.host: "0" elasticsearch.hosts: [ "http://192.168.101.4:9200" ] #修改之前是 http://elasticsearch:9200/
monitoring.ui.container.elasticsearch.enabled: true
4.重启容器
docker container restart 592f35773efc
再次查看页面,显示成功