Skip to main content

Elasticsearch collector

Elasticsearch is a search engine based on the Lucene library.

This module monitors one or more Elasticsearch instances, depending on your configuration.

Used endpoints:

  • Local node metrics: /_nodes/_local/stats
  • Local node indices' metrics: /_cat/indices?local=true
  • Cluster health metrics: /_cluster/health
  • Cluster metrics: /_cluster/stats

Each endpoint can be enabled/disabled in the module configuration file.

Metrics

All metrics have "elasticsearch." prefix.

Labels per scope:

  • global: no labels.
  • index: index.
MetricScopeDimensionsUnits
node_indices_indexingglobalindexoperations/s
node_indices_indexing_currentglobalindexoperations
node_indices_indexing_timeglobalindexmilliseconds
node_indices_searchglobalqueries, fetchesoperations/s
node_indices_search_currentglobalqueries, fetchesoperations
node_indices_search_timeglobalqueries, fetchesmilliseconds
node_indices_refreshglobalrefreshoperations/s
node_indices_refresh_timeglobalrefreshmilliseconds
node_indices_flushglobalflushoperations/s
node_indices_flush_timeglobalflushmilliseconds
node_indices_fielddata_memory_usageglobalusedbytes
node_indices_fielddata_evictionsglobalevictionsoperations/s
node_indices_segments_countglobalsegmentssegments
node_indices_segments_memory_usage_totalglobalusedbytes
node_indices_segments_memory_usageglobalterms, stored_fields, term_vectors, norms, points, doc_values, index_writer, version_map, fixed_bit_setbytes
node_indices_translog_operationsglobaltotal, uncommittedoperations
node_indices_translog_sizeglobaltotal, uncommittedbytes
node_file_descriptorsglobalopenfd
node_jvm_heapglobalinusepercentage
node_jvm_heap_bytesglobalcommitted, usedbytes
node_jvm_buffer_pools_countglobaldirect, mappedpools
node_jvm_buffer_pool_direct_memoryglobaltotal, usedbytes
node_jvm_buffer_pool_mapped_memoryglobaltotal, usedbytes
node_jvm_gc_countglobalyoung, oldgc/s
node_jvm_gc_timeglobalyoung, oldmilliseconds
node_thread_pool_queuedglobalgeneric, search, search_throttled, get, analyze, write, snapshot, warmer, refresh, listener, fetch_shard_started, fetch_shard_store, flush, force_merge, managementthreads
node_thread_pool_rejectedglobalgeneric, search, search_throttled, get, analyze, write, snapshot, warmer, refresh, listener, fetch_shard_started, fetch_shard_store, flush, force_merge, managementthreads
cluster_communication_packetsglobalreceived, sentpps
cluster_communicationglobalreceived, sentbytes/s
http_connectionsglobalopenconnections
breakers_tripsglobalrequests, fielddata, in_flight_requests, model_inference, accounting, parenttrips/s
http_connectionsglobalopenconnections
cluster_health_statusglobalgreen, yellow, redstatus
cluster_number_of_nodesglobalnodes, data_nodesnodes
cluster_shards_countglobalactive_primary, active, relocating, initializing, unassigned, delayed_unaasignedshards
cluster_pending_tasksglobalpendingtasks
cluster_number_of_in_flight_fetchglobalin_flight_fetchfetches
cluster_indices_countglobalindicesindices
cluster_indices_shards_countglobaltotal, primaries, replicationshards
cluster_indices_docs_countglobaldocsdocs
cluster_indices_store_sizeglobalsizebytes
cluster_indices_query_cacheglobalhit, missevents/s
cluster_nodes_by_role_countglobalcoordinating_only, data, ingest, master, ml, remote_cluster_client, voting_onlynodes
node_index_healthindexgreen, yellow, redstatus
node_index_shards_countindexshardsshards
node_index_docs_countindexdocsdocs
node_index_store_sizeindexstore_sizebytes

Configuration

Edit the go.d/elasticsearch.conf configuration file using edit-config from the Netdata config directory, which is typically at /etc/netdata.

cd /etc/netdata # Replace this path with your Netdata config directory
sudo ./edit-config go.d/elasticsearch.conf

To add a new endpoint to collect metrics from, or change the URL that Netdata looks for, add or configure the name and url values. Endpoints can be both local or remote as long as they expose their metrics on the provided URL.

Here is an example with two endpoints:

jobs:
- name: local
url: http://127.0.0.1:9200

- name: remote
url: http://203.0.113.0:9200

For all available options, see the Elasticsearch collector's configuration file.

Troubleshooting

To troubleshoot issues with the elasticsearch collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

  • Navigate to the plugins.d directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the plugins setting under [directories].

    cd /usr/libexec/netdata/plugins.d/
  • Switch to the netdata user.

    sudo -u netdata -s
  • Run the go.d.plugin to debug the collector:

    ./go.d.plugin -d -m elasticsearch

Was this page helpful?

Need more help?