简要说明:elasticsearch安装好后需要安装相应的插件Head ,Kopf与Bigdesk,才能更好的实现各种功能,一下就是这三种插件安装的基本步骤
(一)安装ElasticSearch-Head
ElasticSearch-Head 是一个与Elastic集群(Cluster)相交互的Web前台。
ES-Head的主要作用:
它展现ES集群的拓扑结构,并且可以通过它来进行索引(Index)和节点(Node)级别的操作
它提供一组针对集群的查询API,并将结果以json和表格形式返回
它提供一些快捷菜单,用以展现集群的各种状态
安装方分为:在线安装和手动安装
(1)在线安装
[appuser@zabbix 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/local/elasticsearch/plugins/head [appuser@zabbix elasticsearch]$ ls plugins/ head
(2)手动安装
在安装前需要在https://github.com/mobz/elasticsearch-head.git 网站下 先下载文件elasticsearch-head-master.zip(wget https://github.com/mobz/elasticsearch-head/archive/master.zip)
[appuser@GJB-UAT elasticsearch]$ ./plugin install file:///tmp/install/elk/elasticsearch- head-master.zip -> Installing /tmp/install/elk/elasticsearch-head-master.zip... Trying https://download.elastic.co//tmp/tmp-install.zip ... Trying https://search.maven.org/remotecontent?filepath=/tmp/install/tmp-install.zip ... [appuser@GJB-UAT plugins]$ ll /usr/local/elasticsearch/plugins/ drwxrwxr-x. 5 appuser appuser 4096 5月 11 16:31 head #########不过最简单的方式是:把刚下载的elasticsearch-head-master.zip解压并放到 /usr/local/elasticsearch/plugins/head目录下 [root@db22 elk]# unzip elasticsearch-head-master.zip Archive: elasticsearch-head-master.zip adc0c89be13dd6268d835e34922753e1eeb5856c creating: elasticsearch-head-master/ extracting: elasticsearch-head-master/.dockerignore inflating: elasticsearch-head-master/.gitignore inflating: elasticsearch-head-master/.jshintrc inflating: elasticsearch-head-master/Dockerfile inflating: elasticsearch-head-master/Dockerfile-alpine inflating: elasticsearch-head-master/Gruntfile.js inflating: elasticsearch-head-master/LICENCE inflating: elasticsearch-head-master/README.textile creating: elasticsearch-head-master/_site/ inflating: elasticsearch-head-master/_site/app.css [appuser@db22 plugins]$ cp -p -r /tmp/install/elk/elasticsearch-head-master/* head/ [appuser@db22 plugins]$ ll head/ total 60 -rw-r--r--. 1 appuser appuser 248 Mar 29 11:05 Dockerfile -rw-r--r--. 1 appuser appuser 221 Mar 29 11:05 Dockerfile-alpine -rw-r--r--. 1 appuser appuser 104 Mar 29 11:05 elasticsearch-head.sublime-project -rw-r--r--. 1 appuser appuser 2171 Mar 29 11:05 Gruntfile.js -rw-r--r--. 1 appuser appuser 3482 Mar 29 11:05 grunt_fileSets.js -rw-r--r--. 1 appuser appuser 1088 Mar 29 11:05 index.html -rw-r--r--. 1 appuser appuser 559 Mar 29 11:05 LICENCE -rw-r--r--. 1 appuser appuser 886 Mar 29 11:05 package.json -rw-r--r--. 1 appuser appuser 100 Mar 29 11:05 plugin-descriptor.properties drwxr-xr-x. 4 appuser appuser 4096 Mar 29 11:05 proxy -rw-r--r--. 1 appuser appuser 6692 Mar 29 11:05 README.textile drwxr-xr-x. 5 appuser appuser 4096 Mar 29 11:05 _site drwxr-xr-x. 4 appuser appuser 4096 Mar 29 11:05 src drwxr-xr-x. 4 appuser appuser 4096 Mar 29 11:05 test [appuser@db22 elasticsearch]$ /usr/local/elasticsearch/bin/elasticsearch &
插件head安装完成后的访问地址如下:http://IP:9200/_plugin/head/(本人的访问地址如下:http://192.168.180.3:9200/_plugin/head/)
备注:在2.x之前版本的命令行格式为:
./bin/plugin install --url file:///tmp/install/elk/elasticsearch-head-master.zip
(二)安装ElasticSearch-Kopf
1,介绍:kopf是一个ElasticSearch的管理工具,它提供了对ES集群操作的API。版本支持如下:
2,安装步骤如下:
[appuser@GJB-UAT local]$ ./elasticsearch/bin/plugin install lmenezes/elasticsea rch-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/local/elasticsearch/plugins/kopf [appuser@GJB-UAT local]$ ll elasticsearch/plugins/ drwxrwxr-x. 5 appuser appuser 4096 5月 11 16:31 head drwxrwxr-x 8 appuser appuser 4096 5月 16 15:56 kopf
3,访问地址如下:http://IP:9200/_plugin/kopf (http://192.168.180.3:9200/_plugin/kopf/)
(三)安装 ElasticSearch-Bigdesk
1,说明:bigdesk是elasticsearch的一个集群监控工具,可以通过它来查看es集群的各种状态,如:cpu、内存使用情况,索引数据、搜索情况,http连接数等。
2,安装步骤:
安装打开网站https://github.com/lukas-vlcek/bigdesk
[appuser@GJB-UAT elk]$ unzip bigdesk-master.zip Archive: bigdesk-master.zip 4dd7545d4c012bf56def273385a7626cd7d70bc6 creating: bigdesk-master/ extracting: bigdesk-master/.gitignore inflating: bigdesk-master/LICENSE inflating: bigdesk-master/NOTICE inflating: bigdesk-master/README.md inflating: bigdesk-master/bigdesk-1.0.0.jpg inflating: bigdesk-master/bigdesk-2.0.0-SNAPSHOT.jpg creating: bigdesk-master/css/ creating: bigdesk-master/css/CssGrid_2/ inflating: bigdesk-master/css/CssGrid_2/1140.css inflating: bigdesk-master/css/CssGrid_2/License.txt inflating: bigdesk-master/css/CssGrid_2/ie.css inflating: bigdesk-master/css/CssGrid_2/styles.css inflating: bigdesk-master/css/bigdesk.css inflating: bigdesk-master/css/normalize.css inflating: bigdesk-master/css/reset.css creating: bigdesk-master/p_w_picpaths/ inflating: bigdesk-master/p_w_picpaths/1license.txt extracting: bigdesk-master/p_w_picpaths/award_star_gold.png inflating: bigdesk-master/p_w_picpaths/es-logo.png extracting: bigdesk-master/p_w_picpaths/favicon.png inflating: bigdesk-master/index.html creating: bigdesk-master/js/ inflating: bigdesk-master/js/bigdeskApp.js creating: bigdesk-master/js/charts/ inflating: bigdesk-master/js/charts/bigdesk_charts.js inflating: bigdesk-master/js/charts/common.css creating: bigdesk-master/js/charts/not-available/ inflating: bigdesk-master/js/charts/not-available/not-available-chart.css inflating: bigdesk-master/js/charts/not-available/not-available-chart.js inflating: bigdesk-master/js/charts/not-available/test-not-available-chart.html creating: bigdesk-master/js/charts/pack/ inflating: bigdesk-master/js/charts/pack/pack.css creating: bigdesk-master/js/charts/time-area/ inflating: bigdesk-master/js/charts/time-area/test-time-area-chart.html inflating: bigdesk-master/js/charts/time-area/time-area-chart.css inflating: bigdesk-master/js/charts/time-area/time-area-chart.js creating: bigdesk-master/js/charts/time-series/ inflating: bigdesk-master/js/charts/time-series/test-time-series-chart.html inflating: bigdesk-master/js/charts/time-series/time-series-chart.css inflating: bigdesk-master/js/charts/time-series/time-series-chart.js creating: bigdesk-master/js/lib/ creating: bigdesk-master/js/lib/D3-v2.8.1/ inflating: bigdesk-master/js/lib/D3-v2.8.1/LICENSE inflating: bigdesk-master/js/lib/D3-v2.8.1/d3.v2.min.js creating: bigdesk-master/js/lib/backbone/ inflating: bigdesk-master/js/lib/backbone/LICENSE inflating: bigdesk-master/js/lib/backbone/backbone-min.js creating: bigdesk-master/js/lib/css3-mediaqueries/ inflating: bigdesk-master/js/lib/css3-mediaqueries/License.txt inflating: bigdesk-master/js/lib/css3-mediaqueries/css3-mediaqueries.js creating: bigdesk-master/js/lib/jquery/ inflating: bigdesk-master/js/lib/jquery/jquery-1.7.1.min.js creating: bigdesk-master/js/lib/mustache/ inflating: bigdesk-master/js/lib/mustache/LICENSE inflating: bigdesk-master/js/lib/mustache/mustache.js creating: bigdesk-master/js/lib/tinysort/ inflating: bigdesk-master/js/lib/tinysort/License.txt inflating: bigdesk-master/js/lib/tinysort/jquery.tinysort.min.js creating: bigdesk-master/js/lib/underscore/ inflating: bigdesk-master/js/lib/underscore/LICENSE inflating: bigdesk-master/js/lib/underscore/underscore-min.js creating: bigdesk-master/js/models/ inflating: bigdesk-master/js/models/Hello.js creating: bigdesk-master/js/models/cluster/ inflating: bigdesk-master/js/models/cluster/ClusterHealth.js inflating: bigdesk-master/js/models/cluster/ClusterState.js inflating: bigdesk-master/js/models/cluster/IndicesStatus.js inflating: bigdesk-master/js/models/cluster/NodeInfo.js inflating: bigdesk-master/js/models/cluster/NodesState.js inflating: bigdesk-master/js/models/cluster/NodesStats.js creating: bigdesk-master/js/store/ inflating: bigdesk-master/js/store/BigdeskStore.js creating: bigdesk-master/js/util/ inflating: bigdesk-master/js/util/bigdesk_extension.js creating: bigdesk-master/js/views/ inflating: bigdesk-master/js/views/ClusterHealthView.js inflating: bigdesk-master/js/views/ClusterNodesListView.js inflating: bigdesk-master/js/views/ClusterStateView.js inflating: bigdesk-master/js/views/SelectedClusterNodeView.js inflating: bigdesk-master/js/views/templates.js [appuser@GJB-UAT elk]$ ll 总用量 330504 drwxrwxr-x 5 appuser appuser 4096 4月 27 2015 bigdesk-master -rw-r--r-- 1 root root 337682 5月 16 15:07 bigdesk-master.zip -rw-r--r-- 1 appuser appuser 920168 5月 16 15:28 master.zip drwxr-xr-x 9 appuser appuser 4096 5月 3 00:34 node-v6.10.3 -rw-r--r-- 1 appuser appuser 26762674 5月 16 13:32 node-v6.10.3.tar.gz [appuser@GJB-UAT elk]$ cd bigdesk-master [appuser@GJB-UAT bigdesk-master]$ ls bigdesk-1.0.0.jpg css index.html LICENSE README.md bigdesk-2.0.0-SNAPSHOT.jpg p_w_picpaths js NOTICE [appuser@GJB-UAT bigdesk-master]$ mv * /usr/local/elasticsearch/plugins/bigdesk/_site
3,在plugin/bigdesk目录下创建/usr/local/elasticsearch/plugins/bigdesk/plugin-descriptor.properties
[appuser@GJB-UAT bigdesk]$ vim /usr/local/elasticsearch/plugins/bigdesk/plugin-descrip tor.properties description=head - A web front end for an elastic search cluster version=master site=true name=bigdesk
4,修改BigdeskStore.js 文件在第142行的地方去掉major == 1条件
[appuser@GJB-UAT _site]$ vim /usr/local/elasticsearch/plugins/bigdesk/_site/js/store/B
igdeskStore.js #####在第142行的时候去掉major == 1条件
return ( minor >= 0 && maintenance >= 0 && (build != 'Beta1' || build != 'Beta2
'));
// return (major == 1 && minor >= 0 && maintenance >= 0 && (build != 'Beta1' |
| build != 'Beta2'));
5,重启elasticsearch 然后访问,访问地址: http:IP:9200/_plugin/bigdesk (http://192.168.180.3:9200/_plugin/bigdesk/)
Bigdesk目前只支持到ElasticSearch 1.3.x
至此ElasticSearch插件安装---Head ,Kopf与Bigdesk插件安装完成。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。