安装kibana

官方参考

  • 下载源码包
[root@master_agent logfile]# wget https://artifacts.elastic.co/downloads/kibana/kibana-5.5.1-linux-x86_64.tar.gz
  • 解压、移动到/usr/locaL/文件下,创建软链接
[root@master_agent logfile]# tar -xzf kibana-4.3.3-linux-x64.tar.gz 
[root@master_agent logfile]# mv kibana-4.3.3-linux-x64 /usr/local/
[root@master_agent logfile]# ln -s /usr/local/kibana-4.3.3-linux-x64/ /usr/local/kibana
  • 进入目录,编写kebana配置文件
[root@master_agent logfile]# cd /usr/local/kibana
[root@master_agent kibana]# ls
bin  config  data  LICENSE.txt  node  node_modules  NOTICE.txt  optimize  package.json  plugins  README.txt  src  ui_framework  webpackShims
[root@master_agent kibana]# cd config/
[root@master_agent config]# ls
kibana.yml
[root@master_agent config]# vim kibana.yml
  • 修改内容如下:
[root@master_agent config]# grep '^[a-z]' kibana.yml 
server.port: 5601
server.host: "0.0.0.0"
elasticsearch.url: "http://172.16.1.201:9200"
kibana.index: ".kibana"   ##给kibana一个存放的位置,直接给个索引
[root@master_agent config]#
  • 安装一个工具:
[root@master_agent config]# yum install screen -y
  • 输入命令 screnn 进入一个新的窗口
[root@master_agent config]# screen
  • 然后输入启动路径,然后按下Ctrl+a+d键,让其后台运行
[root@master_agent config]# screen 




[root@master_agent config]# /usr/local/kibana/bin/kibana
 [root@master_agent config]# /usr/local/kibana/bin/kibana
  log   [08:16:42.337] [info][status][plugin:kibana] Status changed from uninitialized to green - Ready
  log   [08:16:42.368] [info][status][plugin:elasticsearch] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [08:16:42.380] [info][status][plugin:kbn_vislib_vis_types] Status changed from uninitialized to green - Ready
  log   [08:16:42.384] [info][status][plugin:markdown_vis] Status changed from uninitialized to green - Ready
  log   [08:16:42.394] [info][status][plugin:metric_vis] Status changed from uninitialized to green - Ready
  log   [08:16:42.401] [info][status][plugin:spyModes] Status changed from uninitialized to green - Ready
  log   [08:16:42.405] [info][status][plugin:statusPage] Status changed from uninitialized to green - Ready
  log   [08:16:42.408] [info][status][plugin:table_vis] Status changed from uninitialized to green - Ready
  log   [08:16:42.414] [info][listening] Server running at http://0.0.0.0:5601
  log   [08:16:42.428] [info][status][plugin:elasticsearch] Status changed from yellow to green - Kibana index ready
  • 查看后台运行状态
  • screen -ls 查看screen运行的进程
  • screen -wipe 移除已经kill的进程
[root@master_agent config]# screen -ls
There is a screen on:
	26843.pts-0.master_agent	(Detached)
1 Socket in /var/run/screen/S-root.

[root@master_agent config]#
  • 输入URL访问web页面 kibana页面
  • 配置kibana索引

image

  • kibana查看事件方法 image
打赏作者

Leave a Reply

Your email address will not be published.