|||
初次安装Marvel,有30天的使用时间,当到期后,只保存7天的数据,所以需要注册申请一个license:
一、注册信息可随意填写
注册申请地址:
https://register.elastic.co/marvel_register
注册后的license会以邮箱的形式进行反馈。下载相应的lincese版本,上传至服务器。
二、使用以下命令查看elasticsearch版本
curl -XGET -u user:password 'http://<host>:<port>/_licence'
三、更新licence
1.curl -XPUT 'http://<host>:<port>/_license' -d @license.json
返回:
{"acknowledged":false,"license_status":"valid","acknowledge":{"message":"This license update requires acknowledgement. To acknowledge the license, please read the following messages and update the license again, this time with the "acknowledge=true" parameter:","marvel":["basic","Automatic index cleanup is locked to 7 days for clusters with [{}] license.basic"]}}
2.curl -XPUT 'http://<host>:<port>/_licenses?acknowledge=true' -d @license.json
返回:
{"acknowledged":true,"license_status":"valid"}
3.再查看一下licence:curl -XGET -u user:password 'http://10.26.44.42:9200/_license'
参考文档:
Elasticsearch2.x:
https://www.elastic.co/guide/en/marvel/current/license-management.html
Elasticsearch5.x:
https://www.elastic.co/guide/en/x-pack/current/installing-license.html