Marvel是Elastic公司推出的商业监控方案,是用来监控Elasticsearch集群,历史状态的有力工具,便于性能优化以及故障诊断。监控主要分为六个层面,分别是集群层、节点层、索引层、分片层、事件层、Sense。

l 监控参数配置

可以通过在每个节点的elasticsearch.yml中配置Marvel参数来控制从Elasticsearch集群中采集数据,可以添加一个自定义索引模板来更改索引监控的设置,从一个集群收集的数据中创建存储。

监控设置的参数在elasticsearch.yml文件中,从marvel.agent开始。

marvel.agent.cluster.state.timeout

设置用于收集群集状态的超时时间。默认为10秒。

marvel.agent.cluster.stats.timeout

设置用于收集群集统计的超时时间。默认为10秒。

marvel.agent.indices

控制哪些索引数据被收集,默认所有索引。指定索引的名称可以以逗号分隔的分开,例如test1,test2,test3。名称中可以包含通配符,例如test*。你可以明确地包括或排除相关索引。例如,包括所有以test开头,但要排除test3的索引,写法如下:+test*或者-test3。

marvel.agent.index.stats.timeout

设置用于收集索引统计的超时。默认为10秒。

marvel.agent.indices.stats.timeout

设置用于收集总索引统计的超时时间。默认为10秒。

marvel.agent.exporters

配置代理监测数据。默认情况下,代理安装在本地的群集上,它监视数据,使用HTTP协议把数据发送到一个单独的监控集群上,例如:

marvel.agent.exporters:

id1:                              # default local exporter

type: local

id2:                                     # example of an http exporter

type: http                             # exporter type, local or http

host: [ "http://domain:port",... ]     # host(s) to send data to over http or https

auth:

username: <string>            # basic auth username

password: <string>            # basic auth password

connection:

timeout: <time_value>         # http connection timeout (default: 6s)

read_timeout: <time_value>    # http response timeout (default: connection.timeout * 10)

keep_alive: true | false      # use persistent connections (default: true)

ssl:

hostname_verification: true | false  # check host certificate (default: true)

protocol: <string>                   # security protocol (default: TLSv1.2)

truststore.path: /path/to/file       # absolute path to the truststore

truststore.password: <string>        # password for the truststore

truststore.algorithm: <string>       # format for the truststore (default: SunX509)

index:

name:

time_format: <string>              # time format suffix for marvel indices (default: "YYYY.MM.dd")

marvel.agent.index.recovery.active_only

控制是否所有的恢复数据被收集。设置为true收集有效的恢复数据。默认为false。

marvel.agent.index.recovery.timeout

设置用于收集恢复数据的超时时间。默认为10秒。

marvel.agent.interval

控制收集数据样本的频率。默认设置为10秒,设置为-1表示禁用数据收集。

marvel.history.duration

设置监控创建的索引将被自动删除的保留时间。默认为7天。设置为-1来禁用自动删除监控索引。

l 监控索引配置

监控使用一个索引模板来配置用于存储从集群中收集数据的索引。

可以通过如下命令检索默认的模板:

GET /_template/.marvel-es

默认情况下,模板配置一个分片和一个复制的监控索引。要覆盖默认设置,可以添加自己的模板,例如:

PUT /_template/custom_marvel

{

"template": ".marvel*",

"order": 1,

"settings": {

"number_of_shards": 5,

"number_of_replicas": 2

}

}

l Kibana配置相关

在Kibana 的配置文件(kibana.yml)中可以设置Marvel监控参数,在大多数情况下,默认值已经可以很好工作。

marvel.max_bucket_size

从检索索引节点指标聚合中返回执行聚合检索索引和节点的桶的数量。默认为10000。

marvel.min_interval_seconds

时间桶所能表示的最小秒数。默认为10秒。

marvel.node_resolver

被认为是唯一节点的标志。

marvel.report_stats

是否将集群统计数据发送到Elastic公司。默认为true。

l Tribe部落节点监控配置

如果你通过一个部落节点连接到一个集群,需要在部落节点以及集群中的节点上安装监控代理来监控集群。如果群集上设置了权限,则还需要在部落节点上安装和配置权限。

排除部落节时需要在elasticsearch.yml配置文件中设置marvel.enabled为false,例如:

node.name: tribe

marvel.enabled: false

tribe:

t1:

cluster.name: cluster1

discovery.zen.ping.unicast.hosts: ["cluster1-node1:9300", "cluster1-node2:9300"]

有了这个配置后,部落节点被包含在监控用户界面中显示的节点数中,但不包含在节点列表中,因为它不将任何数据导出到监视群集中。

下面的示例是在监控所有部落级的数据:

node.name: tribe

marvel.enabled: false

tribe:

t1:

cluster.name: cluster1

discovery.zen.ping.unicast.hosts: ["cluster1-node1:9300", "cluster1-node2:9300"]

marvel:

enabled: true

agent.exporters:

id1:

type: http

host: ["monitoringhost:9200"]

当启用部落节点的数据收集时,它包含在节点计数和节点列表中。值得注意的是,部落节点只支持HTTP的输出,部落节点的数据必须发送到外部监控群集上。

最新文章

  1. 盘点销售一体机 打印POS一体的设备。 打印,盘点,销售PDA(手持终端)+移动销售POS软件
  2. win7 装了VB虚拟机 开始挺好用 后来突然就打不开了 提示如下错误:(如图)创建 COM 对象失败.
  3. asp.net关于如何准许api跨域访问
  4. linux 源码安装
  5. 【python cookbook】【数据结构与算法】16.筛选序列中的元素
  6. 逻辑回归损失函数(cost function)
  7. 使用imageLoader加载图片资源
  8. 201621123027 《Java程序设计》第1周学习总结
  9. ORM框架--GreenDao 3.0基本使用指南
  10. DQL、DML、DDL、DCL区别
  11. Python-接口自动化(六)
  12. JS 手机端多张图片上传
  13. iOS 中的block异常 判断block是否为空
  14. Elegance and familiarity are orthogonal.
  15. ios中模态弹窗用法及UINavigationController基本用法
  16. ios block一定会犯的几个错误
  17. jQuery table td可编辑
  18. R语言绘图时的边界碰撞问题
  19. 【RF库Collections测试】Sort List
  20. C Looooops(扩展欧几里得)题解

热门文章

  1. Visual Studio编辑类模板的位置
  2. Golang调用windows下的dll动态库中的函数
  3. netcat 瑞士军刀
  4. hibernate 多对多(many-to-many)
  5. 剑指Offer-第一章面试细节总结
  6. oracle 删除当前用户下多个表
  7. win10开始键点击无效果
  8. RbbitMQ基础知识
  9. Windows下.svn文件夹的最简易删除方法
  10. C# 反射之SqlDatareader转换为Model实体.