Docker : Docker安装Kibana

1.美图

在这里插入图片描述

2.安装

拉取镜像

docker pull kibana:7.4.1

运行Kibana

docker run --name kibana -p 5601:5601 -d kibana:7.4.1

查看

base) lcc@lcc ~$ docker ps
CONTAINER ID        IMAGE                                                 COMMAND                  CREATED             STATUS              PORTS                                            NAMES
274c6174cc97        kibana:7.4.1                                          "/usr/local/bin/dumb…"   2 minutes ago       Up 2 minutes        0.0.0.0:5601->5601/tcp                           kibana
4b1215a95bf7        docker.elastic.co/elasticsearch/elasticsearch:6.3.2   "/usr/local/bin/dock…"   32 minutes ago      Up 19 minutes       0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp   es4
63996417b29b        mobz/elasticsearch-head:5                             "/bin/sh -c 'grunt s…"   About an hour ago   Up About an hour    0.0.0.0:9100->9100/tcp                           es_admin1
(base) lcc@lcc ~$

查看 http://localhost:5601

在这里插入图片描述

查看docker 日志

{"type":"log","@timestamp":"2020-03-25T01:10:37Z","tags":["warning","elasticsearch","admin"],"pid":7,"message":"No living connections"}
{"type":"log","@timestamp":"2020-03-25T01:10:39Z","tags":["warning","elasticsearch","admin"],"pid":7,"message":"Unable to revive connection: http://elasticsearch:9200/"}
{"type":"log","@timestamp":"2020-03-25T01:10:39Z","tags":["warning","elasticsearch","admin"],"pid":7,"message":"No living connections"}
{"type":"log","@timestamp":"2020-03-25T01:10:42Z","tags":["warning","elasticsearch","admin"],"pid":7,"message":"Unable to revive connection: http://elasticsearch:9200/"}
{"type":"log","@timestamp":"2020-03-25T01:10:42Z","tags":["warning","elasticsearch","admin"],"pid":7,"message":"No living connections"}

发现设置的IP地址并没生效,那么我们干脆修改配置文件

接下来,需要进入容器更新配置

(base) lcc@lcc es$ docker exec -it kibana1 /bin/bash
bash-4.2$ vi config/kibana.yml
# ** THIS IS AN AUTO-GENERATED FILE **
#

# Default Kibana configuration for docker target
server.name: kibana
server.host: "0"
elasticsearch.hosts: [ "http://localhost:9200" ]
xpack.monitoring.ui.container.elasticsearch.enabled: true

修改成自己的IP,然后重启容器

(base) lcc@lcc es$ docker restart kibana1

启动后效果访问http://127.0.0.1:5601/ ,然后一样的报错

在这里插入图片描述
后来发现是版本问题,我的es版本是5.6 那么安装kibana也是5.6就好了

(base) lcc@lcc es$ docker run --name kibana-56  -p 5601:5601 -e ELASTICSEARCH_HOSTS=http://localhost:9200 -d kibana:5.6
cff9b71d84c0907a10315115ba6621fa7920f01bed94754e4dbb89671e0ab25f

在这里插入图片描述

关于版本参考:elasticsearch和Kibana版本对比

参考:https://segmentfault.com/a/1190000020745081?utm_source=tag-newest

发布了1148 篇原创文章 · 获赞 454 · 访问量 144万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 酷酷鲨 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览