Documentation Index
Fetch the complete documentation index at: https://otel.fyi/llms.txt
Use this file to discover all available pages before exploring further.
Elasticsearch Receiver
contrib
Maintainers: @jsirianni, @VihasMakwana, @rogercoll
Source: opentelemetry-collector-contrib
Supported Telemetry
Overview
Note: in the future, Elasticsearch will be instrumented with the OpenTelemetry Java SDK directly (https://github.com/elastic/elasticsearch/issues/109335). When this is complete, native OpenTelemetry metrics may be added for measuring cluster health, index statistics, and so on. Please subscribe to the linked issue to keep updated.Prerequisites
This receiver supports Elasticsearch versions 7.9+ If Elasticsearch security features are enabled, you must have either themonitor or manage cluster privilege.
See the Elasticsearch docs for more information on authorization and Security privileges.
Configuration
The following settings are optional:nodes(default:["_all"]): Allows specifying node filters that define which nodes are scraped for node-level and cluster-level metrics. See the Elasticsearch documentation for allowed filters. If this option is left explicitly empty, then no node-level metrics will be scraped and cluster-level metrics will scrape only metrics related to cluster’s health.skip_cluster_metrics(default:false): If true, cluster-level metrics will not be scraped.indices(default:["_all"]): Allows specifying index filters that define which indices are scraped for index-level metrics. See the Elasticsearch documentation for allowed filters. If this option is left explicitly empty, then no index-level metrics will be scraped.endpoint(default =http://localhost:9200): The base URL of the Elasticsearch API for the cluster to monitor.username(no default): Specifies the username used to authenticate with Elasticsearch using basic auth. Must be specified if password is specified.password(no default): Specifies the password used to authenticate with Elasticsearch using basic auth. Must be specified if username is specified.collection_interval(default =10s): This receiver collects metrics on an interval. This value must be a string readable by Golang’s time.ParseDuration. On larger clusters, the interval may need to be lengthened, as querying Elasticsearch for metrics will take longer on clusters with more nodes.initial_delay(default =1s): defines how long this receiver waits before starting.
Example Configuration
Metrics
The following metric are available with versions:elasticsearch.indexing_pressure.memory.limit>= 7.10elasticsearch.node.shards.data_set.size>= 7.13elasticsearch.cluster.state_update.count>= 7.16.0elasticsearch.cluster.state_update.time>= 7.16.0
Metrics
| Metric Name | Description | Unit | Type | Attributes |
|---|---|---|---|---|
✅ elasticsearch.breaker.memory.estimated | Estimated memory used for the operation. | By | Gauge | circuit_breaker_name |
✅ elasticsearch.breaker.memory.limit | Memory limit for the circuit breaker. | By | UpDownCounter | circuit_breaker_name |
✅ elasticsearch.breaker.tripped | Total number of times the circuit breaker has been triggered and prevented an out of memory error. | 1 | Counter | circuit_breaker_name |
✅ elasticsearch.cluster.data_nodes | The number of data nodes in the cluster. | {nodes} | UpDownCounter | |
✅ elasticsearch.cluster.health | The health status of the cluster. | {status} | UpDownCounter | health_status |
✅ elasticsearch.cluster.in_flight_fetch | The number of unfinished fetches. | {fetches} | UpDownCounter | |
❌ elasticsearch.cluster.indices.cache.evictions | The number of evictions from the cache for indices in cluster. | {evictions} | Counter | cache_name |
✅ elasticsearch.cluster.nodes | The total number of nodes in the cluster. | {nodes} | UpDownCounter | |
✅ elasticsearch.cluster.pending_tasks | The number of cluster-level changes that have not yet been executed. | {tasks} | UpDownCounter | |
✅ elasticsearch.cluster.published_states.differences | Number of differences between published cluster states. | 1 | UpDownCounter | cluster_published_difference_state |
✅ elasticsearch.cluster.published_states.full | Number of published cluster states. | 1 | UpDownCounter | |
✅ elasticsearch.cluster.shards | The number of shards in the cluster. | {shards} | UpDownCounter | shard_state |
✅ elasticsearch.cluster.state_queue | Number of cluster states in queue. | 1 | UpDownCounter | cluster_state_queue_state |
✅ elasticsearch.cluster.state_update.count | The number of cluster state update attempts that changed the cluster state since the node started. | 1 | Counter | cluster_state_update_state |
✅ elasticsearch.cluster.state_update.time | The cumulative amount of time updating the cluster state since the node started. | ms | Counter | cluster_state_update_state, cluster_state_update_type |
❌ elasticsearch.index.cache.evictions | The number of evictions from the cache for an index. | {evictions} | Counter | cache_name, index_aggregation_type |
❌ elasticsearch.index.cache.memory.usage | The size in bytes of the cache for an index. | By | UpDownCounter | cache_name, index_aggregation_type |
❌ elasticsearch.index.cache.size | The number of elements of the query cache for an index. | 1 | UpDownCounter | index_aggregation_type |
✅ elasticsearch.index.documents | The number of documents for an index. | {documents} | UpDownCounter | document_state, index_aggregation_type |
✅ elasticsearch.index.operations.completed | The number of operations completed for an index. | {operations} | Counter | operation, index_aggregation_type |
✅ elasticsearch.index.operations.merge.current | The number of currently active segment merges | {merges} | Gauge | index_aggregation_type |
❌ elasticsearch.index.operations.merge.docs_count | The total number of documents in merge operations for an index. | {documents} | Counter | index_aggregation_type |
❌ elasticsearch.index.operations.merge.size | The total size of merged segments for an index. | By | Counter | index_aggregation_type |
✅ elasticsearch.index.operations.time | Time spent on operations for an index. | ms | Counter | operation, index_aggregation_type |
✅ elasticsearch.index.segments.count | Number of segments of an index. | {segments} | UpDownCounter | index_aggregation_type |
❌ elasticsearch.index.segments.memory | Size of memory for segment object of an index. | By | UpDownCounter | index_aggregation_type, segments_memory_object_type |
❌ elasticsearch.index.segments.size | Size of segments of an index. | By | UpDownCounter | index_aggregation_type |
✅ elasticsearch.index.shards.size | The size of the shards assigned to this index. | By | UpDownCounter | index_aggregation_type |
❌ elasticsearch.index.translog.operations | Number of transaction log operations for an index. | {operations} | Counter | index_aggregation_type |
❌ elasticsearch.index.translog.size | Size of the transaction log for an index. | By | UpDownCounter | index_aggregation_type |
✅ elasticsearch.indexing_pressure.memory.limit | Configured memory limit, in bytes, for the indexing requests. | By | Gauge | |
✅ elasticsearch.indexing_pressure.memory.total.primary_rejections | Cumulative number of indexing requests rejected in the primary stage. | 1 | Counter | |
✅ elasticsearch.indexing_pressure.memory.total.replica_rejections | Number of indexing requests rejected in the replica stage. | 1 | Counter | |
✅ elasticsearch.memory.indexing_pressure | Memory consumed, in bytes, by indexing requests in the specified stage. | By | UpDownCounter | indexing_pressure_stage |
✅ elasticsearch.node.cache.count | Total count of query cache misses across all shards assigned to selected nodes. | {count} | UpDownCounter | query_cache_count_type |
✅ elasticsearch.node.cache.evictions | The number of evictions from the cache on a node. | {evictions} | Counter | cache_name |
✅ elasticsearch.node.cache.memory.usage | The size in bytes of the cache on a node. | By | UpDownCounter | cache_name |
❌ elasticsearch.node.cache.size | Total amount of memory used for the query cache across all shards assigned to the node. | By | UpDownCounter | |
✅ elasticsearch.node.cluster.connections | The number of open tcp connections for internal cluster communication. | {connections} | UpDownCounter | |
✅ elasticsearch.node.cluster.io | The number of bytes sent and received on the network for internal cluster communication. | By | Counter | direction |
✅ elasticsearch.node.disk.io.read | The total number of kilobytes read across all file stores for this node. | KiBy | UpDownCounter | |
✅ elasticsearch.node.disk.io.write | The total number of kilobytes written across all file stores for this node. | KiBy | UpDownCounter | |
✅ elasticsearch.node.documents | The number of documents on the node. | {documents} | UpDownCounter | document_state |
✅ elasticsearch.node.fs.disk.available | The amount of disk space available to the JVM across all file stores for this node. Depending on OS or process level restrictions, this might appear less than free. This is the actual amount of free disk space the Elasticsearch node can utilise. | By | UpDownCounter | |
✅ elasticsearch.node.fs.disk.free | The amount of unallocated disk space across all file stores for this node. | By | UpDownCounter | |
✅ elasticsearch.node.fs.disk.total | The amount of disk space across all file stores for this node. | By | UpDownCounter | |
✅ elasticsearch.node.http.connections | The number of HTTP connections to the node. | {connections} | UpDownCounter | |
✅ elasticsearch.node.ingest.documents | Total number of documents ingested during the lifetime of this node. | {documents} | Counter | |
✅ elasticsearch.node.ingest.documents.current | Total number of documents currently being ingested. | {documents} | UpDownCounter | |
✅ elasticsearch.node.ingest.operations.failed | Total number of failed ingest operations during the lifetime of this node. | {operation} | Counter | |
✅ elasticsearch.node.open_files | The number of open file descriptors held by the node. | {files} | UpDownCounter | |
✅ elasticsearch.node.operations.completed | The number of operations completed by a node. | {operations} | Counter | operation |
❌ elasticsearch.node.operations.current | Number of query operations currently running. | {operations} | Gauge | operation |
❌ elasticsearch.node.operations.get.completed | The number of hits and misses resulting from GET operations. | {operations} | Counter | get_result |
❌ elasticsearch.node.operations.get.time | The time spent on hits and misses resulting from GET operations. | ms | Counter | get_result |
✅ elasticsearch.node.operations.time | Time spent on operations by a node. | ms | Counter | operation |
✅ elasticsearch.node.pipeline.ingest.documents.current | Total number of documents currently being ingested by a pipeline. | {documents} | UpDownCounter | ingest_pipeline_name |
✅ elasticsearch.node.pipeline.ingest.documents.preprocessed | Number of documents preprocessed by the ingest pipeline. | {documents} | UpDownCounter | ingest_pipeline_name |
✅ elasticsearch.node.pipeline.ingest.operations.failed | Total number of failed operations for the ingest pipeline. | {operation} | Counter | ingest_pipeline_name |
✅ elasticsearch.node.script.cache_evictions | Total number of times the script cache has evicted old data. | 1 | Counter | |
✅ elasticsearch.node.script.compilation_limit_triggered | Total number of times the script compilation circuit breaker has limited inline script compilations. | 1 | Counter | |
✅ elasticsearch.node.script.compilations | Total number of inline script compilations performed by the node. | {compilations} | UpDownCounter | |
❌ elasticsearch.node.segments.memory | Size of memory for segment object of a node. | By | UpDownCounter | segments_memory_object_type |
✅ elasticsearch.node.shards.data_set.size | Total data set size of all shards assigned to the node. This includes the size of shards not stored fully on the node, such as the cache for partially mounted indices. | By | UpDownCounter | |
✅ elasticsearch.node.shards.reserved.size | A prediction of how much larger the shard stores on this node will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities. A value of -1 indicates that this is not available. | By | UpDownCounter | |
✅ elasticsearch.node.shards.size | The size of the shards assigned to this node. | By | UpDownCounter | |
✅ elasticsearch.node.thread_pool.tasks.finished | The number of tasks finished by the thread pool. | {tasks} | Counter | thread_pool_name, task_state |
✅ elasticsearch.node.thread_pool.tasks.queued | The number of queued tasks in the thread pool. | {tasks} | UpDownCounter | thread_pool_name |
✅ elasticsearch.node.thread_pool.threads | The number of threads in the thread pool. | {threads} | UpDownCounter | thread_pool_name, thread_state |
✅ elasticsearch.node.translog.operations | Number of transaction log operations. | {operations} | Counter | |
✅ elasticsearch.node.translog.size | Size of the transaction log. | By | UpDownCounter | |
✅ elasticsearch.node.translog.uncommitted.size | Size of uncommitted transaction log operations. | By | UpDownCounter | |
✅ elasticsearch.os.cpu.load_avg.15m | Fifteen-minute load average on the system (field is not present if fifteen-minute load average is not available). | 1 | Gauge | |
✅ elasticsearch.os.cpu.load_avg.1m | One-minute load average on the system (field is not present if one-minute load average is not available). | 1 | Gauge | |
✅ elasticsearch.os.cpu.load_avg.5m | Five-minute load average on the system (field is not present if five-minute load average is not available). | 1 | Gauge | |
✅ elasticsearch.os.cpu.usage | Recent CPU usage for the whole system, or -1 if not supported. | % | Gauge | |
✅ elasticsearch.os.memory | Amount of physical memory. | By | Gauge | memory_state |
❌ elasticsearch.process.cpu.time | CPU time used by the process on which the Java virtual machine is running. | ms | Counter | |
❌ elasticsearch.process.cpu.usage | CPU usage in percent. | 1 | Gauge | |
❌ elasticsearch.process.memory.virtual | Size of virtual memory that is guaranteed to be available to the running process. | By | UpDownCounter | |
✅ jvm.classes.loaded | The number of loaded classes | 1 | Gauge | |
✅ jvm.gc.collections.count | The total number of garbage collections that have occurred | 1 | Counter | collector_name |
✅ jvm.gc.collections.elapsed | The approximate accumulated collection elapsed time | ms | Counter | collector_name |
✅ jvm.memory.heap.committed | The amount of memory that is guaranteed to be available for the heap | By | Gauge | |
✅ jvm.memory.heap.max | The maximum amount of memory can be used for the heap | By | Gauge | |
✅ jvm.memory.heap.used | The current heap memory usage | By | Gauge | |
❌ jvm.memory.heap.utilization | Fraction of heap memory usage | 1 | Gauge | |
✅ jvm.memory.nonheap.committed | The amount of memory that is guaranteed to be available for non-heap purposes | By | Gauge | |
✅ jvm.memory.nonheap.used | The current non-heap memory usage | By | Gauge | |
✅ jvm.memory.pool.max | The maximum amount of memory can be used for the memory pool | By | Gauge | memory_pool_name |
✅ jvm.memory.pool.used | The current memory pool memory usage | By | Gauge | memory_pool_name |
✅ jvm.threads.count | The current number of threads | 1 | Gauge |
Attributes
| Attribute Name | Description | Type | Values |
|---|---|---|---|
cache_name | The name of cache. | string | fielddata, query |
name | The name of circuit breaker. | string | |
state | State of the published differences | string | incompatible, compatible |
state | State of the published differences | string | pending, committed |
state | State of cluster state update | string | |
type | Type of cluster state update | string | computation, context_construction, commit, completion, master_apply, notification |
name | The name of the garbage collector. | string | |
direction | The direction of network data. | string | received, sent |
state | The state of the document. | string | active, deleted |
result | Result of get operation | string | hit, miss |
status | The health status of the cluster. | string | green, yellow, red |
aggregation | Type of shard aggregation for index statistics | string | primary_shards, total |
stage | Stage of the indexing pressure | string | coordinating, primary, replica |
name | Name of the ingest pipeline. | string | |
name | The name of the JVM memory pool. | string | |
state | State of the memory | string | free, used |
operation | The type of operation. | string | index, delete, get, query, fetch, scroll, suggest, merge, refresh, flush, warmer |
type | Type of query cache count | string | hit, miss |
object | Type of object in segment | string | term, doc_value, index_writer, fixed_bit_set |
state | The state of the shard. | string | active, active_primary, relocating, initializing, unassigned, unassigned_delayed |
state | The state of the task. | string | rejected, completed |
thread_pool_name | The name of the thread pool. | string | |
state | The state of the thread. | string | active, idle |
Resource Attributes
| Attribute Name | Description | Type | Enabled |
|---|---|---|---|
elasticsearch.cluster.name | The name of the elasticsearch cluster. | string | ✅ |
elasticsearch.index.name | The name of the elasticsearch index. | string | ✅ |
elasticsearch.node.name | The name of the elasticsearch node. | string | ✅ |
elasticsearch.node.version | The version of the elasticsearch node. | string | ✅ |
Configuration
Example Configuration
Last generated: 2026-04-20