ElasticSearch cluster health and node stats exporter for Prometheus
$ ./elasticsearch_exporter --es=https://your-es-url:port
-es
: URL to ElasticSearch, default:http://localhost:9200
-bind
: Address to listen on, default::9092
-time
: Scraping interval in seconds (applies to node stats), default5
-username
: Set the username to be used for the request when XPack is enabled-password
: Used in conjuction withusername
, set its password-enable-siren
: Enable Siren Federate plugin scraping
The exporter collects metrics from /_cluster/health
and from /_nodes/stats
.
# HELP es_active_shards_percent percentage of active shards
# TYPE es_active_shards_percent gauge
es_active_shards_percent 100
# HELP es_cluster_status status of the cluster
# TYPE es_cluster_status gauge
es_cluster_status{status="green"} 1
es_cluster_status{status="red"} 0
es_cluster_status{status="yellow"} 0
# HELP es_nodes_count number of nodes in the cluster
# TYPE es_nodes_count gauge
es_nodes_count 4
# HELP es_shards count of shards by status
# TYPE es_shards gauge
es_shards{status="active"} 348
es_shards{status="active_primary"} 178
es_shards{status="unassigned"} 0
# HELP up whether the last call to ES succeeded
# TYPE up gauge
es_up{endpoint="http://localhost:9200/_cluster/health"} 1
By default, this exporter exposes a minimal set of node level metrics. Currently only the recovery throttle time is collected.
# HELP es_up Current status of ES
# TYPE es_up gauge
es_up 1
# HELP es_indices_recovery_throttle_time_in_millis indices.recovery.throttle_time_in_millis
# TYPE es_indices_recovery_throttle_time_in_millis gauge
es_indices_recovery_throttle_time_in_millis{node="node1"} 0
If started with -enable-siren
, additional Siren Federate metrics are exported:
# HELP es_siren_federate_memory_peak Peak memory usage of Siren Federate off-heap storage
# TYPE es_siren_federate_memory_peak gauge
es_siren_federate_memory_peak{node="node1"} 0
# HELP es_siren_federate_memory_limit Memory limit of Siren Federate off-heap storage
# TYPE es_siren_federate_memory_limit gauge
es_siren_federate_memory_limit{node="node1"} 0