ELK之插件安装

Eelasticsearch插件安装


  • head插件
  • bigdesk插件
  • cerebro插件

head插件

elasticsearch5.0以下版本可以直接在elasticsearch目录下执行对应的命令安装head插件: https://github.com/mobz/elasticsearch-head

# /usr/share/elasticsearch/bin/plugin install mobz/elasticsearch-head
open http://localhost:9200/_plugin/head/

5.0以上不支持直接安装,需要独立服务运行

elasticsearch6.0 head插件的安装方法:
1.安装Node.js
官网:https://nodejs.org/en/download/

wget https://nodejs.org/dist/v8.9.1/node-v8.9.1.tar.gz  #下载安装包  
#解压编译安装
tar xf node-v8.9.1.tar.gz 
cd node-v8.9.1
./configure --prefix=/usr/local/node-8.9.1 && make -j 8 && make install
ln -s /usr/local/node-8.9.1/ /usr/local/node

#配置环境变量
# tail -1 /etc/profile      
export PATH=$PATH:/usr/local/node/bin

# node -v   #查看版本
v8.9.1
# npm -v
5.5.1

centos7要求新版nodejs,如果centos6直接yum install npm即可

2.下载安装head:

# git clone git://github.com/mobz/elasticsearch-head.git
# cd elasticsearch-head
# npm install -g grunt --registry=https://registry.npm.taobao.org  
# npm install  --registry=https://registry.npm.taobao.org

在elasticsearch-head目录下node_modules/grunt下如果没有grunt二进制程序,需要执行

# cd elasticsearch-head
# npm install grunt --save

3.修改配置
修改服务器监听地址:
目录:elasticsearch-head/Gruntfile.js

connect: {
    server: {
        options: {
            port: 9100,
            hostname: '*',
            base: '.',
            keepalive: true
        }
    }
}

增加hostname属性,设置为*

修改head连接地址:
目录:elasticsearch-head/_site/app.js

this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";
把localhost修改成你es的服务器地址,如:
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://192.168.20.101:9200";

解决使用Head插件链接不上集群问题:增加如下两行

# tail -2 /usr/local/elk/elasticsearch-6.0.0/config/elasticsearch.yml  
http.cors.enabled: true
http.cors.allow-origin: "*"

启动:

# cd node_modules/grunt/bin/
# ./grunt server

1.停止elasticsearch主进程并不会影响到head 9100的访问
2.如果要将head进程放入后台运行,可以使用nohup 加&后台运行或者screen

bigdesk插件

要想最快的了解 ES 各节点的性能细节,推荐使用 bigdesk 插件,其原作者为
lukas-vlcek。但是从 Elasticsearch 1.4 版本开始就不再更新了。国内有用户 fork出来继续维护到支持 5.0 版本,GitHub 地址见:https://github.com/hlstudio/bigdesk

bigdesk 通过浏览器直连 ES 节点,发起 RESTful 请求,并渲染结果成图。所以其安装部署极其简单:

# git clone https://github.com/hlstudio/bigdesk
# cd bigdesk/_site
# python -mSimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...

cerebro插件

cerebro 这个名字大家可能觉得很陌生,其实它就是过去的 kopf 插件!因为
Elasticsearch 5.0 不再支持 site plugin,所以 kopf 作者放弃了原项目,另起炉灶搞
了 cerebro,以独立的单页应用形式,继续支持新版本下 Elasticsearch 的管理工
作。

#kopf
# /usr/share/elasticsearch/bin/plugin install lmenezes/elasticsearch-kopf
open http://localhost:9200/_plugin/kopf/

安装部署:
realease版本下载地址:https://github.com/lmenezes/cerebro/releases
解压安装包到一个自定义目录(非elasticsearch或kibana的plugin目录),Run bin/cerebro(or bin/cerebro.bat if on Windows)。界面会让你输入es域名,连接即可。
然后浏览器打开 http://localhost:9000即可。

Elasticsearch的监控方案:bigdesk、cerebro、zabbix等

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值