您的位置:首页 > 运维架构 > Linux

Centos7下elasticsearch管理工具Marvel安装

2016-05-24 18:26 531 查看
我安装的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 ~]#


完美解决!收工!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息