English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Elasticsearch 监视

To monitor the health of the cluster, the monitoring feature collects metrics from each node and stores them in the Elasticsearch index. All settings related to monitoring in Elasticsearch must be in the elasticsearch.yml file on each node, or, if possible, in the dynamic cluster settings.

To start monitoring, we need to check the cluster settings, which can be done in the following ways:

GET _cluster/settings
{
   "persistent" : { },
   "transient" : { }
}

Each component in the stack is responsible for monitoring itself and then forwarding these documents to the Elasticsearch production cluster for routing and indexing (storage). The routing and indexing process in Elasticsearch is handled by so-called collectors and exporters.

Collector

The collector runs once per collection interval to retrieve data from the public API of the Elasticsearch it monitors. After data collection is complete, the data is batched and sent to the monitoring cluster for export.

Each data type collects only one collector. Each collector can create zero or more monitored documents.

导出器

导出器将从任何Elastic Stack源收集的数据路由到监视集群。可以配置多个导出器,但是常规设置和默认设置是使用一个导出器。导出器可以在节点级别和群集级别进行配置。

Elasticsearch中有两种类型的导出器-

  • local −此导出器将数据路由回同一群集

  • http −首选的导出器,可用于将数据路由到可通过HTTP访问的任何受支持的Elasticsearch集群中。

在导出程序可以路由监控数据之前,它们必须设置一定的Elasticsearch资源。这些资源包括模板和摄取管道