Our Elasticsearch integration collects and sends inventory and metrics from your Elasticsearch cluster to our platform, where you can see the health of your Elasticsearch environment. We collect metrics at the cluster, node, and index level so you can more easily find the source of any problems.
Read on to install the integration, and to see what data we collect.
Compatibility and requirements
Our integration is compatible with Elasticsearch 5.x through 7.x
If Elasticsearch is not running on Kubernetes or Amazon ECS, you must install the infrastructure agent on a host that's running Elasticsearch. Otherwise:
- If running on Kubernetes, see these requirements.
- If running on ECS, see these requirements.
Quick start
Instrument your Elasticsearch cluster quickly and send your telemetry data with guided install. Our guided install creates a customized CLI command for your environment that downloads and installs the New Relic CLI and the infrastructure agent.
ヒント
If you're hosted in the EU, use our EU guided install.
Install and activate
To install the Elasticsearch integration, follow the instructions for your environment:
Additional notes:
- Advanced: Integrations are also available in tarball format to allow for install outside of a package manager.
- On-host integrations do not automatically update. For best results, regularly update the integration package and the infrastructure agent.
Configure the integration
An integration's YAML-format configuration is where you can place required login credentials and configure how data is collected. Which options you change depend on your setup and preference.
There are several ways to configure the integration, depending on how it was installed:
- If enabled via Kubernetes: see Monitor services running on Kubernetes.
- If enabled via Amazon ECS: see Monitor services running on ECS.
- If installed on-host: edit the config in the integration's YAML config file,
elasticsearch-config.yml
.
Config options are below. For an example, see the example config file on GitHub.
重要
With secrets management, you can configure on-host integrations with New Relic infrastructure's agent to use sensitive data (such as passwords) without having to write them as plain text into the integration's configuration file. For more information, see Secrets management.
Commands
The configuration accepts the following commands commands:
all
: captures inventory for the local Elasticsearch node, and metrics for the Elasticsearch cluster.inventory
: captures only the configuration for the local Elasticsearch node.labels
: Theenv
label controls theenvironment
attribute. The default value isproduction
.
A typical agent deployment consists of one agent installed on each node in an Elasticsearch cluster. Only one node agent should use the all
command, as metrics are collected for the whole cluster. The rest should use the inventory
command.
Arguments
The all
and inventory
commands accept the following arguments:
hostname
: the hostname or IP of the node. Default:localhost
.local_hostname
: the hostname or IP of the Elasticsearch node from which inventory data is collected. Should only be set if you don't want to collect inventory data againstlocalhost
. Default islocalhost
.port
: the port on which the Elasticsearch API is listening. Default:9200
.username
: the username to connect to the API with, if the X-Pack security add-on is installed.password
: the password to connect to the API with, if the X-Pack security add-on is installed.use_ssl
: whether or not to connect using SSL. Default:false
.ca_bundle_dir
: location of SSL certificate on the host. Only required ifuse_ssl
istrue
.ca_bundle_file
: location of SSL certificate on the host. Only required ifuse_ssl
istrue
.timeout
: the timeout for API requests, in seconds. Default:30
.ssl_alternative_hostname
: an alternative server hostname that the integration will accept as valid for the purposes of SSL negotiation.timeout
: the timeout for API requests, in seconds. Default:30
.config_path
: the path to the Elasticsearch configuration file. Default:/etc/elasticsearch/elasticsearch.yml
.collect_indices
:true
orfalse
to collect indices metrics. Iftrue
collect indices, else do not.indices_regex
: can be used to filter which indices are collected. If left blank it will be ignored.collect_primaries
:true
orfalse
to collect primaries metrics. Iftrue
collect primaries, else do not.
Example configuration
For an example config, see the example config file on GitHub.
For more about the general structure of on-host integration configuration, see Configuration.
Find and use data
Data from this service is reported to an integration dashboard.
Elasticsearch data is attached to the following event types:
You can query this data for troubleshooting purposes or to create custom charts and dashboards.
For more on how to find and use your data, see Understand integration data.
Metric data
The Elasticsearch integration collects the following metric data attributes. Each metric name is prefixed with a category indicator and a period, such as cluster.
or shards.
.
Elasticsearch cluster metrics
These attributes are attached to the ElasticsearchClusterSample
event type:
Metric | Description |
---|---|
| The number of data nodes in the cluster. |
| The number of nodes in the cluster. |
| The Elasticsearch cluster health: |
| The number of active shards in the cluster. |
| The number of shards that are currently initializing. |
| The number of active primary shards in the cluster. |
| The number of shards that are relocating from one node to another. |
| The number of shards that are unassigned to a node. |
Elasticsearch node metrics
These attributes are attached to the ElasticsearchNodeSample
event type:
Metric | Description |
---|---|
| The number of active searches. |
| The time spent on the search fetch. |
| The estimated size of the field data circuit breaker, in bytes. |
| The estimated size of the parent circuit breaker, in bytes. |
| The estimated size of the request circuit breaker, in bytes. |
| The number of times the field data circuit breaker has tripped. |
| The number of times the parent circuit breaker has tripped. |
| The number of times the request circuit breaker has tripped. |
| The size of the id cache, in bytes. |
| The number of index flushes to disk since start. |
| The time spent flushing the index to disk. |
| Bytes available to this Java virtual machine on this file store, in bytes. |
| The total bytes read from the file store, in bytes. |
| The total bytes used for all I/O operations on the file store, in bytes. |
| The total I/O operations on the file store. |
| The total number of reads from the file store. |
| The total size of the file store, in bytes. |
| The total number of unallocated bytes in the file store, in bytes. |
| The total number of writes to the file store. |
| The total bytes written to the file store, in bytes. |
| The number of get requests currently running. |
| The number of get requests where the document existed. |
| The time spent on get requests where the document existed. |
| The number of get requests where the document was missing. |
| The time spent on get requests where the document was missing. |
| The time spent on get requests. |
| The number of get requests. |
| The number of current open HTTP connections. |
| The number of opened HTTP connections. |
| The number of documents currently being deleted from an index. |
| The number of documents currently being indexed to an index. |
| The number of documents indexed to an index. |
| The time spent deleting documents from an index. |
| The time spent indexing documents to an index. |
| The number of documents deleted from an index. |
| The number of failed indexing operations. |
| The time indexing waited due to throttling. |
| The memory used by the query cache, in bytes. |
| The number of indices in the cluster. |
| The number of query cache evictions. |
| The number of query cache hits. |
| The number of query cache misses. |
| The number of ongoing recoveries for which a shard serves as a source. |
| The number of ongoing recoveries for which a shard serves as a target. |
| The total time recoveries waited due to throttling. |
| The number of request cache evictions. |
| The number of request cache hits. |
| The memory used by the request cache, in bytes. |
| The number of request cache misses. |
| The number of segments in an index shard. |
| The maximum memory used by the index writer, in bytes. |
| The memory used by doc values, in bytes. |
| The memory used by fixed bit set, in bytes. |
| The memory used by index segments, in bytes. |
| The memory used by the index writer, in bytes. |
| The memory used by norm, in bytes. |
| The memory used by the segment version map, in bytes. |
| The memory used by stored fields, in bytes. |
| The memory used by terms, in bytes. |
| The memory used by term vectors, in bytes. |
| The number of operations in the transaction log. |
| The size of the transaction log, in bytes. |
| The number of garbage collections run by the JVM. |
| The time spent on garbage collection in the JVM. |
| The number of concurrent mark & sweep GCs in the JVM. |
| The time spent on concurrent mark & sweep GCs in the JVM. |
| The number of major GCs in the JVM that collect old generation objects. |
| The time spent in major GCs in the JVM that collect old generation objects. |
| The number of minor GCs in the JVM that collects young generation objects. |
| The time spent in minor GCs in the JVM that collects young generation objects. |
| The number of parallel new GCs in the JVM. |
| The time spent on parallel new GCs in the JVM. |
| The amount of memory guaranteed to be available to the JVM heap, in bytes. |
| The maximum amount of memory that can be used by the JVM heap, in bytes. |
| The percentage of memory currently used by the JVM heap as a value between |
| The amount of memory currently used by the JVM heap, in bytes. |
| The maximum amount of memory that can be used by the old generation heap, in bytes. |
| The maximum amount of memory that can be used by the survivor space, in bytes. |
| The maximum amount of memory that can be used by the young generation heap, in bytes. |
| The amount of memory guaranteed to be available to JVM non-heap, in bytes. |
| The amount of memory currently used by the JVM non-heap, in bytes. |
| The amount of memory currently used by the old generation heap, in bytes. |
| The amount of memory currently used by the survivor space, in bytes. |
| The amount of memory currently used by the young generation heap, in bytes. |
| The number of active threads in the JVM. |
| The peak number of threads used by the JVM. |
| The number of currently active segment merges. |
| The number of documents across segments currently being merged. |
| The number of documents across all merged segments. |
| The size of all merged segments, in bytes. |
| The number of segment merges. |
| The size of the segments currently being merged, in bytes. |
| The time spent on segment merging. |
| The number of opened file descriptors associated with the current process, or |
| The number of queries. |
| The number of index refreshes. |
| The time spent on index refreshes. |
| The number of search fetches currently running. |
| The number of search fetches. |
| The size of the store, in bytes. |
| The number of queued threads in the bulk pool. |
| The number of active threads in the bulk pool. |
| The number of rejected threads in the bulk pool. |
| The number of threads in the bulk pool. |
| The number of queued threads in the fetch shard started pool. |
| The number of rejected threads in the fetch shard started pool. |
| The number of threads in the fetch shard started pool. |
| The number of active threads in the fetch shard store pool. |
| The number of queued threads in the fetch shard store pool. |
| The number of rejected threads in the fetch shard store pool. |
| The number of threads in the fetch shard store pool. |
| The number of active threads in the flush queue. |
| The number of queued threads in the flush pool. |
| The number of rejected threads in the flush pool. |
| The number of threads in the flush pool. |
| The number of active threads for force merge operations. |
| The number of queued threads for force merge operations. |
| The number of rejected threads for force merge operations. |
| The number of threads for force merge operations. |
| The number of active threads in the generic pool. |
| The number of queued threads in the generic pool. |
| The number of rejected threads in the generic pool. |
| The number of threads in the generic pool. |
| The number of active threads in the get pool. |
| The number of queued threads in the get pool. |
| The number of rejected threads in the get pool. |
| The number of threads in the get pool. |
| The number of active threads in the index pool. |
| The number of queued threads in the index pool. |
| The number of rejected threads in the index pool. |
| The number of threads in the index pool. |
| The number of active threads in the listener pool. |
| The number of queued threads in the listener pool. |
| The number of rejected threads in the listener pool. |
| The number of threads in the listener pool. |
| The number of active threads in the management pool. |
| The number of queued threads in the management pool. |
| The number of rejected threads in the management pool. |
| The number of threads in the management pool. |
| The number of active threads in the merge pool. |
| The number of queued threads in the merge pool. |
| The number of rejected threads in the merge pool. |
| The number of threads in the merge pool. |
| The number of active threads in the percolate pool. |
| The number of queued threads in the percolate pool. |
| The number of rejected threads in the percolate pool. |
| The number of threads in the percolate pool. |
| The number of active threads in the refresh pool. |
| The number of queued threads in the refresh pool. |
| The number of rejected threads in the refresh pool. |
| The number of threads in the refresh pool. |
| The number of active threads in the search pool. |
| The number of queued threads in the search pool. |
| The number of rejected threads in the search pool. |
| The number of threads in the search pool. |
| The number of active threads in the snapshot pool. |
| The number of queued threads in the snapshot pool. |
| The number of rejected threads in the snapshot pool. |
| The number of threads in the snapshot pool. |
| The number of active threads in the fetch shard started pool. |
| The number of connections opened for cluster communication. |
| The number of packets received in cluster communication. |
| The size of data received in cluster communication, in bytes. |
| The number of packets sent in cluster communication. |
| The size of data sent in cluster communication, in bytes. |
Elasticsearch common metrics
These attributes are attached to the ElasticsearchCommonSample
event type:
| The number of documents deleted from the primary shards. |
| The number of documents in the primary shards. |
| The number of index flushes to disk from the primary shards since start. |
| The time spent flushing the index to disk from the primary shards. |
| The number of get requests on primary shards where the document existed. |
| The time spent on get requests from the primary shards where the document existed. |
| The number of get requests from the primary shards where the document was missing. |
| The time spent on get requests from the primary shards where the document was missing. |
| The number of get requests from the primary shards. |
| The number of get requests currently running on the primary shards. |
| The time spent on get requests from the primary shards. |
| The number of documents currently being deleted from an index on the primary shards. |
| The time spent deleting documents from an index on the primary shards. |
| The number of documents currently being indexed to an index on the primary shards. |
| The time spent indexing documents to an index on the primary shards. |
| The number of documents deleted from an index on the primary shards. |
| The number of documents indexed to an index on the primary shards. |
| The number of index refreshes on the primary shards. |
| The time spent on index refreshes on the primary shards. |
| The number of currently active segment merges on the primary shards. |
| The number of documents across segments currently being merged on the primary shards. |
| The number of documents across all merged segments on the primary shards. |
| The size of the segments currently being merged on the primary shards, in bytes. |
| The number of segment merges on the primary shards. |
| The size of all merged segments on the primary shards, in bytes. |
| The time spent on segment merging on the primary shards. |
| The time spent querying on the primary shards. |
| The number of queries to the primary shards. |
| The number of currently active queries on the primary shards. |
| The number of query fetches currently running on the primary shards. |
| The time spent on query fetches on the primary shards. |
| The number of query fetches on the primary shards. |
| The size of all the primary shards, in bytes. |
Elasticsearch index metrics
These attributes are attached to the ElasticsearchIndexSample
event type:
| The number of documents in the index. |
| The number of deleted documents in the index. |
| The status of the index: |
| The number of primary shards in the index. |
| The store size of primary shards in the index. |
| The number of replica shards in the index. |
| The store size of primary and replica shards in the index, in bytes. |
Inventory data
The Elasticsearch integration captures the configuration parameters of the Elasticsearch node, as specified in the YAML config file. It also collects node configuration information from the "_nodes/_local" endpoint. The data is available on the Inventory page, under the config/elasticsearch source. For more about inventory data, see Understand integration data.
Check the source code
This integration is open source software. That means you can browse its source code and send improvements, or create your own fork and build it.
その他のヘルプ
さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:
- Explorers Hubでは、コミュニティからのサポートを受けたり、ディスカッションに参加したりすることができます。
- 当社サイトで答えを見つけて、サポートポータルの使用方法を確認してください。
- Linux、Windows、およびmacOS向けトラブルシューティングツールであるNew Relic Diagnosticsを実行してください。
- New Relicのデータセキュリティとライセンスドキュメント をご確認ください。