kibana是一个与elasticsearch一起工作的开源的分析和可视化的平台。使用kibana可以查询、查看并与存储在elasticsearch索引的数据进行交互操作。使用kibana能执行高级的数据分析,并能以图表、表格和地图的形式查看数据。
kibana使得理解大容量的数据变得非常容易。它非常简单,基于浏览器的接口使我们能够快速的创建和分享显示elasticsearch查询结果实时变化的仪表盘
1、Kibana安装
官网下载 kibana-5.2.2-linux-x86_64.tar.gz
无需安装,解压即用,步骤如下
# cd /usr/local/src/kibana-5.2.2-linux-x86_64.tar.gz
# tar -zxvf kibana-5.2.2-linux-x86_64.tar.gz
# mv kibana-5.2.2-linux-x86_64 /usr/local/kibana
# cd /usr/local/kibana/bin
# ./kibana
2、Kibana安装x-pack插件
1)第一种,直接命令安装x-pack
# cd /usr/local/kibana/bin
# ./kibana-piugin install x-pack (时间略长,耐心等待)
Attempting to transfer from x-pack
Attempting to transfer from https://artifacts.elastic.co/downloads/kibana-plugins/x-pack/x-pack-5.2.2.zip
Transferring 108045644 bytes (换算下大概103M)
2)第二种,下载 x-pack-5.2.2.zip 文件
https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-5.2.2.zip
Elasticsearch,Kibana和Logstash的插件包含在同一个zip文件中。如果已下载此文件以在其中一个产品上安装X-Pack,则可以重复使用同一文件
# ./kibana-plugin instal /usr/local/src/x-pack-5.2.2.zip
3、配置kibana.yml
修改kibana.yml文件:设置es 地址,设置es登录账号、密码
# cd /usr/local/kibana/config
# vi kibana.yml
server.host: "xx.xx.xx.xx"
#默认es x-pack账号、密码
elasticsearch.username: "elastic"
elasticsearch.password: "changeme"
#配置kibana访问的es url
elasticsearch.url: "http://47.97.23.184:9200"
#去除启动日志中的warn
xpack.reporting.encryptionKey: "a random key"
#去除启动日志中的warn,且必须是32位
xpack.security.encryptionKey: "12345678901234567890123456789012"
kibana.index: ".kibana"
# ./kibana
4、验证
访问 http://ip:5601 ,打开如下页面,输入配置文件中配置的username\password登录即可。
页面模块信息如下:
Disvcover [dɪˈskʌvɚ] 发现
Visualize [ˈvɪʒuəˌlaɪz] 可视化
Dashboard [ˈdæʃbɔ:rd] 仪表盘
Timelion 时间轴
Graph 图
Dev Tools 研发工具
Monitoring ['mɒnɪtərɪŋ] 监测
Management 管理
1)页面异常信息,Error: Please specify a default index pattern
创建pattern
附录启动异常,修改配置文件即可:
1)Status changed from uninitialized to red - Authentication Exception
log [08:39:05.379] [warning][security] Session cookies will be transmitted over insecure connections. This is not recommended.
log [08:39:05.434] [error][status][plugin:searchprofiler@5.2.2] Status changed from uninitialized to red - Authentication Exception log [08:39:05.445] [error][status][plugin:tilemap@5.2.2] Status changed from uninitialized to red - Authentication Exception
2)[warning][reporting] Generating a random key for xpack.reporting.encryptionKey. To prevent pending reports from failing on restart, please set xpack.reporting.encryptionKey in kibana.yml
3)[warning][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in kibana.yml
4)[warning][security] Session cookies will be transmitted over insecure connections. This is not recommended.