elasticsearch-prometheus-exporter: Can not increment metric indices_segments_number with value [negative], skipping

Hi,

today I’ve noticed log entries like this in my elasticsearch log:

Aug 23 09:30:27 XXXX elasticsearch[27249]: [2016-08-23 09:30:27,085][ERROR][RestPrometheusMetricsAction]\
Can not increment metric indices_segments_number with value -19.000000, skipping

I took a look at the Prometheus metrics and found metric es_indices_segments_number (prefix “es_”) of type Counter - which is only allowed to increment:

# HELP es_indices_segments_number Current number of segments
# TYPE es_indices_segments_number counter

Should the metric type be changed from Counter to Gauge?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Hi, Thank you for your advice 😃

It’s sometimes hard to guess from ElasticSearch if an internal metric is a counter or not, and you can’t rely on it’s name. In fact, for each metric, I should closely read the ES documentation to know what a metric is supposed to represent.

Maybe UNTYPED could solve this problem, but it could break Prometheus best practices. I have to think about it before.

I have released version 2.3.5.4