一、Marvel插件介绍
Marvel插件:在簇中从每个节点汇集数据。这个插件必须每个节点都得安装。Marvel是Elasticsearch的管理和监控工具,在开发环境下免费使用。它包含了一个叫做Sense的交互式控制台,使用户方便的通过浏览器直接与Elasticsearch进行交互。
二、Marvel插件安装
第一步:
91221.elk.node1.com<2016-12-14 11:04:30> ~
elasticsearch>$ ./plugin install license
-> Installing license…Trying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/license/2.3.2/license-2.3.2.zip …Downloading …….DONEVerifying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/license/2.3.2/license-2.3.2.zip checksums if available …Downloading .DONEInstalled license into /data/elasticsearch/plugins/license
第二步:
91221.elk.node1.com<2016-12-14 11:04:30> ~
elasticsearch>$ ./plugin install marvel-agent
-> Installing marvel-agent…Trying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/marvel-agent/2.3.2/marvel-agent-2.3.2.zip …Downloading ……….DONEVerifying https://download.elastic.co/elasticsearch/release/org/elasticsearch/plugin/marvel-agent/2.3.2/marvel-agent-2.3.2.zip checksums if available …Downloading .DONE
第三步:
使用Kibana安装最新版本的marvel:
91221.elk.node1.com<2016-12-14 11:01:09> /opt/kibana-4.6.1/bin
root># ./kibana plugin --install elasticsearch/marvel/latest
Installing marvel
Attempting to transfer from https://download.elastic.co/elasticsearch/marvel/marvel-latest.tar.gz
Transferring 2399229 bytes....................
Transfer complete
Extracting plugin archive
Extraction complete
Optimizing and caching browser bundles...
Plugin installation complete
第四步:
启动kibana
91221.elk.node1.com<2016-12-14 11:04:56> /opt/kibana-4.6.1/bin
root># ./kibana
log [11:05:02.107] [info][status][plugin:kibana@1.0.0] Status changed from uninitialized to green - Ready
log [11:05:02.162] [info][status][plugin:elasticsearch@1.0.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [11:05:02.198] [info][status][plugin:marvel@2.4.1] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [11:05:02.218] [info][status][plugin:kbn_vislib_vis_types@1.0.0] Status changed from uninitialized to green - Ready
log [11:05:04.943] [info][status][plugin:markdown_vis@1.0.0] Status changed from uninitialized to green - Ready
log [11:05:04.950] [info][status][plugin:metric_vis@1.0.0] Status changed from uninitialized to green - Ready
log [11:05:04.956] [info][status][plugin:spyModes@1.0.0] Status changed from uninitialized to green - Ready
log [11:05:04.961] [info][status][plugin:statusPage@1.0.0] Status changed from uninitialized to green - Ready
log [11:05:04.966] [info][status][plugin:table_vis@1.0.0] Status changed from uninitialized to green - Ready
log [11:05:04.974] [info][listening] Server running at http://0.0.0.0:5601
log [11:05:09.952] [info][status][plugin:elasticsearch@1.0.0] Status changed from yellow to yellow - No existing Kibana index found
log [11:05:15.229] [info][status][plugin:marvel@2.4.1] Status changed from yellow to green - Marvel ready
log [11:05:15.235] [info][status][plugin:elasticsearch@1.0.0] Status changed from yellow to green - Kibana index ready
增加代理的监控
root># cat /opt/elasticsearch-node1/config/elasticsearch.yml
marvel.agent.exporters:
id1:
type: http
host: ["http://192.168.91.221:9200", "http://192.168.91.222:9200", "192.168.91.223:9200"]
访问如图所示