Skip to content

Commit a630686

Browse files
committed
Changed es_indices_segments_number from counter to gauge
1 parent 0010ff9 commit a630686

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ private void registerIndicesMetrics() {
237237

238238
catalog.registerGauge("indices_completion_size_bytes", "Size of completion suggest statistics", "node");
239239

240-
catalog.registerCounter("indices_segments_number", "Current number of segments", "node");
240+
catalog.registerGauge("indices_segments_number", "Current number of segments", "node");
241241
catalog.registerGauge("indices_segments_memory_bytes", "Memory used by segments", "node", "type");
242242

243243
catalog.registerGauge("indices_suggest_current_number", "Current rate of suggests", "node");
@@ -326,7 +326,7 @@ private void updateIndicesMetrics(NodeIndicesStats idx) {
326326

327327
catalog.setGauge("indices_completion_size_bytes", idx.getCompletion().getSizeInBytes(), node);
328328

329-
catalog.setCounter("indices_segments_number", idx.getSegments().getCount(), node);
329+
catalog.setGauge("indices_segments_number", idx.getSegments().getCount(), node);
330330
catalog.setGauge("indices_segments_memory_bytes", idx.getSegments().getMemoryInBytes(), node, "all");
331331
catalog.setGauge("indices_segments_memory_bytes", idx.getSegments().getBitsetMemoryInBytes(), node, "bitset");
332332
catalog.setGauge("indices_segments_memory_bytes", idx.getSegments().getDocValuesMemoryInBytes(), node, "docvalues");

0 commit comments

Comments
 (0)