Centos7下elasticsearch管理工具Marvel安裝

我安裝的elasticsearch版本是2.3.3,這時候看到Marvel插件這個東西不錯,何不上官網查手冊安裝哉!
準備工作:
你得安裝好以下的插件:

  • Java 7 or later
  • Elasticsearch 2.3.3
  • Kibana 4.5.1
  • Elasticsearch License 2.3.3 plugin

這裏Kibana是elastic的一個平臺,具體介紹如下:
Kibana is an open source analytics and visualization platform designed to work with Elasticsearch. You use Kibana to search, view, and interact with data stored in Elasticsearch indices. You can easily perform advanced data analysis and visualize your data in a variety of charts, tables, and maps.
附上:kibana文檔
安裝Kibana並不麻煩。也有多種方式安裝,安裝Kibana的方式不會影響安裝Marvel.
目錄佈局(需要知道):
安裝elasticsearch的方式會對你安裝Marvel有點影響。我的是通過RPM安裝的,所以目錄佈局如下:
這裏寫圖片描述
Marvel的安裝過程十分簡單:

cd /usr/share/elasticsearch
sudo bin/plugin install license
sudo bin/plugin install marvel-agent

結果如下:
這裏寫圖片描述
搞定收工!!
附上:Marvel文檔
License的管理(然而並沒有結束):
有一天我打開.log,文件,突然發現如下:

# License will expire on [Thursday, November 12, 2015]. If you have a new license, please update it.
# Otherwise, please reach out to your support contact.
#
# Commercial plugins operate with reduced functionality on license expiration:
# - marvel
#  - The agent will stop collecting cluster and indices metrics
# - shield
#  - Cluster health, cluster stats and indices stats operations are blocked
#  - All data operations (read and write) continue to work

意思是說你有License的話請更新,不然的話Marvel會停止收集數據停止顯示,會停止清除舊的可視數據(可能翻譯不準確,但是意思很明確,你得更新License)。
於是乎查文檔,聰明的你可能在安裝的時候已經發現了License要更新。
同樣過程並不複雜:
首先通過[Marvel文檔]
找到Manage Your License 如下:
這裏寫圖片描述
在點進去,選擇註冊免費的License 如下:
這裏寫圖片描述
最後跟着一步步來,就可以得到一個Json格式的License,現在到了最後一步,向License的API發送請求!由於一開始使用了免費的全功能的Mravel,所以如官方文檔所示,使用以下命令:

curl -XPUT -u admin 'http://<host>:<port>/_license?acknowledge=true' -d @license.json

參數含義如下:

<host> is the hostname of the Elasticsearch node (localhost if executing locally)
<port> is the http port (defaults to 9200)
license.json is the license JSON file

這時候再登錄Kibana:
這裏寫圖片描述
是不是發生了很大的變化!
再去服務器上看看:

[root@114-212-239-114 ~]# curl -XGET -u admin:password 'http://localhost:9200/_license'{
  "license" : {
    "status" : "active",
    "uid" : "ad01ff41-a038-4dcd-8297-200076b5cb5d",
    "type" : "basic",
    "issue_date" : "2016-04-27T00:00:00.000Z",
    "issue_date_in_millis" : 1461715200000,
    "expiry_date" : "2017-05-24T23:59:59.999Z",
    "expiry_date_in_millis" : 1495670399999,
    "max_nodes" : 100,
    "issued_to" : "申濤 王 (NJU)",
    "issuer" : "Web Form"
  }
}
[root@114-212-239-114 ~]# 

完美解決!收工!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章