1. 程式人生 > >Elasticsearch外掛一——-head外掛安裝詳解(Elasticsearch教程08)|MVP講堂

Elasticsearch外掛一——-head外掛安裝詳解(Elasticsearch教程08)|MVP講堂

作者:阿里雲MVP 銘毅

往期內容:
死磕 Elasticsearch 方法論:普通程式設計師高效精進的 10 大狠招!
Elasticsearch學習,請先看這一篇!(Elasticsearch教程01)
Elasticsearch增、刪、改、查操作深入詳解(Elasticsearch教程02)

一、elasticsearch-head外掛介紹
elasticsearch-head是一個用來瀏覽、與Elastic Search簇進行互動的web前端展示外掛。
elasticsearch-head是一個用來監控Elastic Search狀態的客戶端外掛。(摘自:《實戰Elasticsearch、Logstash、Kibana 分散式大資料搜尋與日誌挖掘及視覺化解決方案》)

elasticsearch-head外掛主要用途:
elasticsearch主要有以下三個主要操作——
1)簇瀏覽,顯示簇的拓撲並允許你執行索引(index)和節點層面的操作。
2)查詢介面,允許你查詢簇並以原始json格式或表格的形式顯示檢索結果。
3)顯示簇狀態,有許多快速訪問的tabs用來顯示簇的狀態。
4)支援Restful API介面,包含了許多選項產生感興趣的結果,包括:
第一,請求方式:get,put,post,delete; json請求資料,節點node, 路徑path。
第二,JSON驗證器。
第三,定時請求的能力。
第四,用javascript表示式傳輸結果的能力。
第五,統計一段時間的結果或該段時間結果比對的能力。
第六,以簡單圖示的形式繪製傳輸結果。

二、 elasticsearch-head外掛安裝
【前提】:作業系統版本
[[email protected] config]# cat /etc/issue
CentOS release 6.6 (Final)

第一步:
[[email protected] bin]$ /usr/local/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 /data/elasticsearch/plugins/head

注意格式: /usr/local/elasticsearch/bin/plugin install mobz/elasticsearch-head

第二步:
**驗證外掛安裝成功標誌:
[[email protected] elasticsearch]$ curl -X GET http://10.8.5.101:9200/_plugin/head
三、前端呈現
**瀏覽器訪問結果:
image
更多ES相關實戰乾貨經驗分享,請關注【銘毅天下】微信公眾號