ELK7.1.1之插件安装

       在5.0版本之后不支持直接把插件包放入es安装目录的plugin目录下,需要单独安装;而且支持在线安装的插件很少,很多都是需要离线安装。以前的plugin变为elasticsearch-plugin

       获取在线安装的插件:

[root@node01 bin]# ./elasticsearch-plugin install -h
Install a plugin
The following official plugins may be installed by name:
  analysis-icu
  analysis-kuromoji
  analysis-nori
  analysis-phonetic
  analysis-smartcn
  analysis-stempel
  analysis-ukrainian
  discovery-azure-classic
  discovery-ec2
  discovery-gce
  ingest-attachment
  mapper-annotated-text
  mapper-murmur3
  mapper-size
  repository-azure
  repository-gcs
  repository-hdfs
  repository-s3
  store-smb
  transport-nio

  接下来我们介绍几款常用插件的安装:

head插件

1.安装环境支持,需要安装nodejs

yum install -y nodejs npm
git clone git://github.com/mobz/elasticsearch-head.git
安装依赖包
cd elasticsearch-head
npm install //执行后会生成node_modules文件夹
如果遇到异常cnpm不是内部或外部命令 cnpm: command not found,则运行如下脚本,使用淘宝镜像包
npm install cnpm -g --registry=https://registry.npm.taobao.org
修改配置文件

2.修改Gruntfile.js
cd elasticsearch-head
vim Gruntfile.js
在该文件中添加如下,务必注意不要漏了添加“,”号,这边的hostname:’*’,表示允许所有IP可以访问,此处也可以修改端口号
server: {
options: {
hostname: '*',
port: 9100,
base: '.',
keepalive: true
}
}

3.修改elasticsearch-head默认连接地址
cd elasticsearch-head/_site
vi app.js
做如下修改,将ip地址修改为对应的服务器的ip地址
将localhost修改为elasticSearch IP
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://10.0.0.71:9200";

4.修改elasticSearch配置文件并启动ElasticSearch
这边需要修改elasticsearch的配置文件elasticsearch.yml,以允许跨域访问,在文末追加如下代码即可
http.cors.enabled: true
http.cors.allow-origin: "*"

5.修改完毕后重新启动ElasticSearch(注意不能使用root权限启动)

6.启动elasticsearch-head
cd /usr/loacl/elasticsearch/elasticsearch-head
nohup ./node_modules/grunt/bin/grunt server &
访问10.0.0.71:9100就能看到我们集群信息

Bigdesk插件

1.下载
git clone https://github.com/hlstudio/bigdesk

扫描二维码关注公众号,回复: 6360040 查看本文章

2.进入到sit目录
cd /bigdesk-master/_site

3.启动web服务器,默认监听端口号8000,指定启动端口,并后台启动
nohup python -m SimpleHTTPServer &
此时通过访问web界面来监控我们的集群状态。
http://10.0.0.71:8000

cerebro插件

1、下载cerebro插件:
git项目:https://github.com/lmenezes/cerebro/releases

2、上传到安装目录、解压:
unzip cerebro-0.8.0.zip

3、进入cerebro
cd cerebro-0.8.0

4、启动:
nohup ./bin/cerebro &

5、浏览器访问10.0.0.71:9000
连接集群http://10.0.0.71:9000
就能看到数据分片信息。

猜你喜欢

转载自www.cnblogs.com/wzxmt/p/10982636.html