From 969c233fa8b59810831407a6d0f1d5a3001fb980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20P=C3=A9rez-Aradros=20Herce?= Date: Tue, 24 Mar 2020 10:51:07 +0100 Subject: [PATCH] rate counters in data.json --- .../module/prometheus/collector/_meta/data.json | 17 ++++++++--------- .../collector/collector_integration_test.go | 9 +++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/x-pack/metricbeat/module/prometheus/collector/_meta/data.json b/x-pack/metricbeat/module/prometheus/collector/_meta/data.json index 53458194fa9..f0fed23d976 100644 --- a/x-pack/metricbeat/module/prometheus/collector/_meta/data.json +++ b/x-pack/metricbeat/module/prometheus/collector/_meta/data.json @@ -12,17 +12,16 @@ "prometheus": { "labels": { "instance": "172.27.0.2:9090", - "job": "prometheus", - "scrape_job": "prometheus" + "interval": "15s", + "job": "prometheus" }, - "prometheus_target_scrape_pool_sync_total": { - "counter": 1 + "prometheus_target_interval_length_seconds_count": { + "counter": 1, + "rate": 0 }, - "prometheus_target_sync_length_seconds_count": { - "counter": 1 - }, - "prometheus_target_sync_length_seconds_sum": { - "counter": 0.000046958 + "prometheus_target_interval_length_seconds_sum": { + "counter": 15.000401344, + "rate": 0 } }, "service": { diff --git a/x-pack/metricbeat/module/prometheus/collector/collector_integration_test.go b/x-pack/metricbeat/module/prometheus/collector/collector_integration_test.go index 9cc3e8e6b5e..179a97c75ce 100644 --- a/x-pack/metricbeat/module/prometheus/collector/collector_integration_test.go +++ b/x-pack/metricbeat/module/prometheus/collector/collector_integration_test.go @@ -18,10 +18,11 @@ func TestData(t *testing.T) { service := compose.EnsureUp(t, "prometheus") config := map[string]interface{}{ - "module": "prometheus", - "metricsets": []string{"collector"}, - "hosts": []string{service.Host()}, - "use_types": true, + "module": "prometheus", + "metricsets": []string{"collector"}, + "hosts": []string{service.Host()}, + "use_types": true, + "rate_counters": true, } ms := mbtest.NewReportingMetricSetV2Error(t, config) var err error