ELK-elasticsearch-6.3.2插件

ELK-elasticsearch-6.3.2插件【head,bigdesk,cerebro[kopf]】安装

 

参考博客:linux下ElasticSearch.6.2.2集群安装与head、Kibana、X-Pack..插件的配置安装

参考博客:ELK5.5.1 插件安装实践纪要(head/bigdesk/kopf/cerebo/中文分词插件)

 

1. x-pack 【该版本默认安装】

1 [[email protected] ~] $ elasticsearch-plugin install x-pack
2 ERROR: this distribution of Elasticsearch contains X-Pack by default

 

 

2. mobz/elasticsearch-head

      3台机器只需要安装一台就可以了

 

2.1. 安装nodejs

复制代码

 1 [[email protected] software]$ pwd
 2 /app/software
 3 [[email protected] software]$ tar xf node-v8.11.4-linux-x64.tar.xz # 从官网下载 
 4 [[email protected] software]$ mv node-v8.11.4-linux-x64 /app/
 5 [[email protected] software]$ cd /app/
 6 [[email protected] ~]$ ln -s node-v8.11.4-linux-x64/ node
 7 ######## 添加环境变量 使用root用户
 8 [[email protected] ~]# vim /etc/profile # 追加如下信息
 9 ………………
10 ### 环境变量添加
11 export NODEJS_HOME=/app/node
12 export PATH=$PATH:$NODEJS_HOME/bin
13 
14 [[email protected] ~]# logout
15 [[email protected] ~]$ source /etc/profile  # 重新加载环境变量 
16 [[email protected] node]$ node -v   # 验证是否安装成功
17 v8.11.4

复制代码

 

2.2. 安装elasticsearch-head

复制代码

 1 [[email protected] software]$ pwd
 2 /app/software
 3 [[email protected] software]$ tar xf elasticsearch-head-5.0.0.tar.gz  # 从git上下载的
 4 [[email protected] software]$ mv elasticsearch-head-5.0.0 /app/
 5 [[email protected] software]$ cd /app/
 6 [[email protected] ~]$ ln -s elasticsearch-head-5.0.0/ elasticsearch-head  
 7 [[email protected] ~]$ cd elasticsearch-head   # 进入目录
 8 [[email protected] elasticsearch-head]$ npm install -g grunt-cli  
 9 /app/node-v8.11.4-linux-x64/bin/grunt -> /app/node-v8.11.4-linux-x64/lib/node_modules/grunt-cli/bin/grunt
10 + [email protected]
11 added 152 packages in 39.838s
12 [[email protected] elasticsearch-head]$ npm install  
13 npm WARN [email protected] license should be a valid SPDX license expression
14 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
15 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
16 
17 up to date in 2.88s
18 [[email protected] elasticsearch-head]$ grunt server &  # 启动服务并后台运行【注意所在目录】
19 #  或者 grunt server >>/app/elasticsearch-head/logs/head_$(date +%F).log 2>>/app/elasticsearch-head/logs/head-err_$(date +%F).log &  
20 # ##日志存放
21 (node:2886) ExperimentalWarning: The http2 module is an experimental API.
22 Running "connect:server" (connect) task
23 Waiting forever...
24 Started connect web server on http://localhost:9100

复制代码

 

浏览器访问

1 http://mini01:9100/    

1 其中红框内的URL可以为:
2 http://mini01:9200/    
3 http://mini02:9200/    
4 http://mini03:9200/    

 

 

3. lukas-vlcek/bigdesk

      只需要安装一台就可以了

 

复制代码

 1 [[email protected] software]$ pwd
 2 /app/software
 3 [[email protected] software]$ tar xf bigdesk-2.2.a.tar.gz  # 从git上下载
 4 [[email protected] software]$ mv bigdesk-2.2.a /app/
 5 [[email protected] software]$ cd /app/
 6 [[email protected] ~]$ ln -s bigdesk-2.2.a/ bigdesk
 7 ###### 启动bigdesk
 8 [[email protected] _site]$ pwd
 9 /app/bigdesk/_site
10 [[email protected] _site]$ python -m SimpleHTTPServer &  # 启动程序【注意所在目录】
11 # python -m SimpleHTTPServer >>/app/bigdesk/logs/bigdesk_$(date +%F).log 2>>/app/bigdesk/logs/bigdesk-err_$(date +%F).log &
12 # 记录日志

复制代码

 

浏览器访问

1 http://mini01:8000    

1 其中红框内的URL可以为:
2 http://mini01:9200/    
3 http://mini02:9200/    
4 http://mini03:9200/    

 

 

 

4. lmenezes/cerebro

       所以不是kopf而是cerebro

 

复制代码

 1 [[email protected] software]$ pwd
 2 /app/software
 3 [[email protected] software]$ tar xf cerebro-0.8.1.tgz   # 从git上下载
 4 [[email protected] software]$ mv cerebro-0.8.1 /app/
 5 [[email protected] software]$ cd /app/
 6 [[email protected] ~]$ ln -s cerebro-0.8.1/ cerebro
 7 # 启动cerebro
 8 [[email protected] cerebro]$ pwd
 9 /app/cerebro
10 [[email protected] cerebro]$ ./bin/cerebro &   # 有日志记录
11 [1] 4683

复制代码

 

浏览器访问

1 http://mini01:9000    

1 其中红框内的URL可以为:
2 http://mini01:9200/    
3 http://mini02:9200/    
4 http://mini03:9200/    

 

 

 

 

5. 通过插件保存数据并查看或删除

5.1. 新建索引并保存数据

       通过head添加数据

 

5.2. 查看数据

 

 

5.6. 删除索引

 

 

6. 关闭es查看状态

6.1. 所有es正常时

 

6.2. 有1台es停止时

 

6.3. 有2台es停止时

 

       备注:为绿色时表示es都正常数据无丢失;黄色表示有es异常,但数据无丢失;红色表示es有异常,并且数据有丢失。