Skip to content

Commit 4bb43aa

Browse files
committed
Replaced counter by gauge for indices_querycache_(miss|total)_count
1 parent 0b65dab commit 4bb43aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ private void registerIndicesMetrics() {
223223
catalog.registerCounter("indices_querycache_evictions_count", "Count of evictions in query cache", "node");
224224
catalog.registerCounter("indices_querycache_hit_count", "Count of hits in query cache", "node");
225225
catalog.registerGauge("indices_querycache_memory_size_bytes", "Memory usage of query cache", "node");
226-
catalog.registerCounter("indices_querycache_miss_count", "Count of misses in query cache", "node");
227-
catalog.registerCounter("indices_querycache_total_count", "Count of usages of query cache", "node");
226+
catalog.registerGauge("indices_querycache_miss_count", "Count of misses in query cache", "node");
227+
catalog.registerGauge("indices_querycache_total_count", "Count of usages of query cache", "node");
228228

229229
catalog.registerGauge("indices_fielddata_memory_size_bytes", "Memory usage of field date cache", "node");
230230
catalog.registerCounter("indices_fielddata_evictions_count", "Count of evictions in field data cache", "node");
@@ -312,8 +312,8 @@ private void updateIndicesMetrics(NodeIndicesStats idx) {
312312
catalog.setCounter("indices_querycache_evictions_count", idx.getQueryCache().getEvictions(), node);
313313
catalog.setCounter("indices_querycache_hit_count", idx.getQueryCache().getHitCount(), node);
314314
catalog.setGauge("indices_querycache_memory_size_bytes", idx.getQueryCache().getMemorySizeInBytes(), node);
315-
catalog.setCounter("indices_querycache_miss_count", idx.getQueryCache().getMissCount(), node);
316-
catalog.setCounter("indices_querycache_total_count", idx.getQueryCache().getTotalCount(), node);
315+
catalog.setGauge("indices_querycache_miss_count", idx.getQueryCache().getMissCount(), node);
316+
catalog.setGauge("indices_querycache_total_count", idx.getQueryCache().getTotalCount(), node);
317317

318318
catalog.setGauge("indices_fielddata_memory_size_bytes", idx.getFieldData().getMemorySizeInBytes(), node);
319319
catalog.setCounter("indices_fielddata_evictions_count", idx.getFieldData().getEvictions(), node);

0 commit comments

Comments
 (0)