From f0d0ed586688ca8da0203f2de30063e095a4fbe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Vl=C4=8Dek?= Date: Tue, 1 Aug 2023 17:06:12 +0200 Subject: [PATCH] Update to OpenSearch internal breaking change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The methods to get operation stats for Ingest operations were renamed. See the following ticket for more details: Signed-off-by: Lukáš Vlček --- .../PrometheusMetricsCollector.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java b/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java index 9b59876..9c14d54 100644 --- a/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java +++ b/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java @@ -639,26 +639,26 @@ private void registerIngestMetrics() { @SuppressWarnings("checkstyle:LineLength") private void updateIngestMetrics(Tuple nodeInfo, IngestStats is) { if (is != null) { - catalog.setNodeGauge(nodeInfo, "ingest_total_count", is.getTotalStats().getIngestCount()); - catalog.setNodeGauge(nodeInfo, "ingest_total_time_seconds", is.getTotalStats().getIngestTimeInMillis() / 1000.0); - catalog.setNodeGauge(nodeInfo, "ingest_total_current", is.getTotalStats().getIngestCurrent()); - catalog.setNodeGauge(nodeInfo, "ingest_total_failed_count", is.getTotalStats().getIngestFailedCount()); + catalog.setNodeGauge(nodeInfo, "ingest_total_count", is.getTotalStats().getCount()); + catalog.setNodeGauge(nodeInfo, "ingest_total_time_seconds", is.getTotalStats().getTotalTimeInMillis() / 1000.0); + catalog.setNodeGauge(nodeInfo, "ingest_total_current", is.getTotalStats().getCurrent()); + catalog.setNodeGauge(nodeInfo, "ingest_total_failed_count", is.getTotalStats().getFailedCount()); for (IngestStats.PipelineStat st : is.getPipelineStats()) { String pipeline = st.getPipelineId(); - catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_count", st.getStats().getIngestCount(), pipeline); - catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_time_seconds", st.getStats().getIngestTimeInMillis() / 1000.0, pipeline); - catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_current", st.getStats().getIngestCurrent(), pipeline); - catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_failed_count", st.getStats().getIngestFailedCount(), pipeline); + catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_count", st.getStats().getCount(), pipeline); + catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_time_seconds", st.getStats().getTotalTimeInMillis() / 1000.0, pipeline); + catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_current", st.getStats().getCurrent(), pipeline); + catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_failed_count", st.getStats().getFailedCount(), pipeline); List pss = is.getProcessorStats().get(pipeline); if (pss != null) { for (IngestStats.ProcessorStat ps : pss) { String processor = ps.getName(); - catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_count", ps.getStats().getIngestCount(), pipeline, processor); - catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_time_seconds", ps.getStats().getIngestTimeInMillis() / 1000.0, pipeline, processor); - catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_current", ps.getStats().getIngestCurrent(), pipeline, processor); - catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_failed_count", ps.getStats().getIngestFailedCount(), pipeline, processor); + catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_count", ps.getStats().getCount(), pipeline, processor); + catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_time_seconds", ps.getStats().getTotalTimeInMillis() / 1000.0, pipeline, processor); + catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_current", ps.getStats().getCurrent(), pipeline, processor); + catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_failed_count", ps.getStats().getFailedCount(), pipeline, processor); } } }