This dynamically creates new metrics with a unique label like node="elasticsearch-01-06 -> 192.168.2.13 WGCtl2PHSTG-NVXziiUETQ elasticsearch-01-09".
If the cluster should reallocate a lot of shards due to whatever reason, this will result in a lot of new (temporary) metrics, which could lead to metric/label explosions in Prometheus.
It would be great, if those reallocating shard metrics could be turned off or needs to be explicitly enabled to avoid having these metrics at all.
Version 1.4.0 of this exporter introduced the new metric
elasticsearch_node_shards_total
, which can be enabled, if required. This was introduced by https://github.com/prometheus-community/elasticsearch_exporter/pull/535.I've enabled this in our Elasticsearch setup as we've built some monitoring alerts based on it:
When a node restarts / crashes or whatever and reallocates / moves a shard, this causes the following Prometheus expression...
....to show something like this for example:
This dynamically creates new metrics with a unique label like
node="elasticsearch-01-06 -> 192.168.2.13 WGCtl2PHSTG-NVXziiUETQ elasticsearch-01-09"
.If the cluster should reallocate a lot of shards due to whatever reason, this will result in a lot of new (temporary) metrics, which could lead to metric/label explosions in Prometheus.
It would be great, if those reallocating shard metrics could be turned off or needs to be explicitly enabled to avoid having these metrics at all.