elasticsearch实战指南(干货Elasticsearch插件介绍)
插件介绍01,下面我们就来聊聊关于elasticsearch实战指南?接下来我们就一起去了解一下吧!
elasticsearch实战指南
插件介绍
01
Haed插件
插件作用:主要是做es集群管理的插件
Github下载地址:https://github.com/mobz/Elasticsearch-head
-
下载方式:
-
[root@abcdocker ~]# /usr/share/elasticsearch/bin/plugin install mobz/elasticsearch-head
-
-> Installing mobz/elasticsearch-head...
-
Trying https://github.com/mobz/elasticsearch-head/archive/master.zip ...
-
Downloading .............................................
-
DONE
-
Verifying https://github.com/mobz/elasticsearch-head/archive/master.zip checksums if available ...
-
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)
-
Installed head into /usr/share/elasticsearch/plugins/head
-
下载完会在/usr/share/elasticsearch/plugins/目录下产生插件目录
访问:http://ip地址:9200/_plugin/head/ 更多干货请关注老男孩教育公众号
02
Bigdesk插件
插件作用:性能监控
Github下载:https://github.com/lukas-vlcek/bigdesk
提示:因为我们使用yum安装的最新版本,bigdesk暂时不支持最新版本
-
[root@abcdocker ~]# /usr/share/elasticsearch/bin/elasticsearch -V
-
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
-
Version: 2.4.4, Build: fcbb46d/2017-01-03T11:33:16Z, jvm: 1.8.0_121
正常访问地址:http://localhost:9200/_plugin/bigdesk/
安装
[root@abcdocker ~]# /usr/share/elasticsearch/bin/plugin install lmenezes/elasticsearch-kopf
-> Installing lmenezes/elasticsearch-kopf...
Trying https://github.com/lmenezes/elasticsearch-kopf/archive/master.zip ...
Downloading
...........................................
DONE
Verifying https://github.com/lmenezes/elasticsearch-kopf/archive/master.zip checksums if available ...
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)
Installed kopf into /usr/share/elasticsearch/plugins/kopf
访问地址:http://192.168.56.11:9200/_plugin/kopf/
插件使用
1、Head插件使用介绍
现在我们已经将插件安装完成,这时候里面还没有数据。我们现在往里面写一些数据
点击提交
_index:创建了一个索引index-demo
_type:创建了一个类型test
total:分片2个
Successful:成功1个
Failed:失败0个
Created:状态成功
我们点击概览,点击连接
我们写一篇文档会帮我们分成5片(0-4,可以修改成多个),粗线代表主分片细线代表副本分片(可以理解为一主一备)正常情况下会将主分片和副本分片放在2台机器上。
集群健康值介绍
黄色代表没有主分片数据丢失,但是现在不是健康的状态(警告)应该有10个分片,现在只有5个。
红色代表有数据丢失
绿色代表正常
提示:es支持一个类似于快照的功能,方便我们用于数据备份
Es索引信息
这里索引信息是open代表我们可以将它给关闭掉,这样就不会继续使用这个索引进行搜索
关闭索引
除了支持关闭和开启索引,同样也支持删除
提示:删除之后索引数据是无法恢复的
Head插件小缺点: 当我们索引特别多的时候,打开head至少需要五分钟。因为它要把所有的索引都扫描一遍进行展示,这时候打开使用的带宽也会特别大(不会出现超时,一直等待就可以)
们索引特别多的时候,打开head至少需要五分钟。因为它要把所有的索引都扫描一遍进行展示,这时候打开使用的带宽也会特别大(不会出现超时,一直等待就可以)
2、kopf插件使用介绍
访问地址:http://192.168.56.11:9200/_plugin/kopf/
我们可以看到索引、分片、文档数量、大小以及jvm使用情况、disk、cpu、load等
我们点击节点,就可以看到更详细的硬件信息(实时变化)
同样kopf也支持head的插件,支持请求
(生产场景这个信息主要给开发使用)
提示:es是有自己的查询语言,可以写的很复杂。
其他功能
Create index: 创建索引:
▲ Cluster settings: 集群设置:
▲ Aliases: 别名:
▲ Analysis: 分析:
▲ Percolator: 过滤器:
▲ Snapshot: 快照
▲ Index templates: 索引模板:
▲ Cat apis: api
▲ Hot threads: 热线程:
ES的介绍到此就结束了,希望大家可以把学到的只是融会贯通,做到不懂就问,听后就实践。
,免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com