3.1 下载Kibana插件

https://www.elastic.co/downloads/kibana

这里写图片描述

注意,ElasticSearch版本是6.1.1,kibana的版本必须对应,所以,此处下载kibana-6.1.1-linux-x86_64.tar.gz

[es@node1 ~]$ wget https://artifacts.elastic.co/downloads/kibana/kibana-6.1.1-linux-x86_64.tar.gz
--2018-01-06 04:30:47--  https://artifacts.elastic.co/downloads/kibana/kibana-6.1.1-linux-x86_64.tar.gz
Resolving artifacts.elastic.co (artifacts.elastic.co)... 184.73.156.41, 54.235.82.130, 184.72.218.26, ...
Connecting to artifacts.elastic.co (artifacts.elastic.co)|184.73.156.41|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 65947685 (63M) [application/x-gzip]
Saving to: ‘kibana-6.1.1-linux-x86_64.tar.gz’

100%[============================================================================================>] 65,947,685   190KB/s   in 16m 34s

2018-01-06 04:47:24 (64.8 KB/s) - ‘kibana-6.1.1-linux-x86_64.tar.gz’ saved [65947685/65947685]

[es@node1 ~]$ 

3.2 解压缩

[es@node1 ~]$ tar -zxvf kibana-6.1.1-linux-x86_64.tar.gz

进入kibana根目录

[es@node1 ~]$ cd kibana-6.1.1-linux-x86_64
[es@node1 kibana-6.1.1-linux-x86_64]$

3.3 修改配置

修改kibana配置文件kibana.yml

[es@node1 kibana-6.1.1-linux-x86_64]$ vi config/kibana.yml 

需要配置两处
(1)kibana向外提供服务,运行远程用户访问

# To allow connections from remote users, set this parameter to a non-loopback address.
server.host: "node1"

(2)配置elasticsearch.url

# The URL of the Elasticsearch instance to use for all your queries.
elasticsearch.url: "http://node1:9200"

3.4 启动kibana

[es@node1 kibana-6.1.1-linux-x86_64]$ bin/kibana
  log   [15:10:36.975] [info][status][plugin:kibana@6.1.1] Status changed from uninitialized to green - Ready
  log   [15:10:37.109] [info][status][plugin:elasticsearch@6.1.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [15:10:37.154] [info][status][plugin:console@6.1.1] Status changed from uninitialized to green - Ready
  log   [15:10:37.227] [info][status][plugin:metrics@6.1.1] Status changed from uninitialized to green - Ready
  log   [15:10:37.279] [info][status][plugin:elasticsearch@6.1.1] Status changed from yellow to green - Ready
  log   [15:10:38.033] [info][status][plugin:timelion@6.1.1] Status changed from uninitialized to green - Ready
  log   [15:10:38.057] [info][listening] Server running at http://node1:5601

这里写图片描述

3.5 简单应用

这里写图片描述

这里写图片描述

curl -XGET “http://node1:9200/test/_search

[root@node1 ~]# curl -XGET "http://node1:9200/test/_search"
{"took":3,"timed_out":false,"_shards":{"total":5,"successful":5,"skipped":0,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}[root@node1 ~]# 

3.6 可能遇到的问题

启动kibana后关闭shell窗口后kibana自动关闭
解决办法:退出当前登录窗口用exit命令,不要直接点击窗口上的叉来关闭

[elastic@node1 kibana-5.6.9]$ bin/kibana &
[1] 9709
[elastic@node1 kibana-5.6.9]$   log   [14:50:31.223] [info][status][plugin:kibana@5.6.9] Status changed from uninitialized to green - Ready
  log   [14:50:31.343] [info][status][plugin:elasticsearch@5.6.9] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [14:50:31.401] [info][status][plugin:console@5.6.9] Status changed from uninitialized to green - Ready
  log   [14:50:31.448] [info][status][plugin:metrics@5.6.9] Status changed from uninitialized to green - Ready
  log   [14:50:31.489] [info][status][plugin:elasticsearch@5.6.9] Status changed from yellow to green - Kibana index ready
  log   [14:50:31.737] [info][status][plugin:timelion@5.6.9] Status changed from uninitialized to green - Ready
  log   [14:50:31.743] [info][listening] Server running at http://node1:5601
  log   [14:50:31.745] [info][status][ui settings] Status changed from uninitialized to green - Ready

[elastic@node1 kibana-5.6.9]$ 
[elastic@node1 kibana-5.6.9]$ exit
logout
Connection closing...Socket close.

Connection closed by foreign host.

Disconnected from remote host(ES-5.6) at 22:52:23.

Type `help' to learn how to use Xshell prompt.
[d:\~]$ 

这样的话,http://node1:5601页面依然可以访问


为了操作方便,也可以设置环境变量

[root@elastic1 ~]# vi /etc/profile.d/custom.sh 
[root@elastic1 ~]# cat /etc/profile.d/custom.sh
#!/bin/bash
#java path
export JAVA_HOME=/opt/jdk1.8.0_192
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib

#kibana
export PATH=$PATH:/opt/kibana-6.4.3/bin
[root@elastic1 ~]#
[root@elastic1 ~]# source /etc/profile.d/custom.sh 
[elastic@elastic1 ~]$ kibana &
[1] 15969
[elastic@elastic1 ~]$
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e added ecosystem file for PM2 4 年前
5def40a3 Add host customization support for the NodeJS version 4 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐