diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 3520d130a5f8..f507f6d0d3d6 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -62,6 +62,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d *Metricbeat* +- Add _bucket to histogram metrics in Prometheus Collector {pull}11578[11578] + *Packetbeat* - Prevent duplicate packet loss error messages in HTTP events. {pull}10709[10709] diff --git a/metricbeat/module/prometheus/collector/collector_test.go b/metricbeat/module/prometheus/collector/collector_test.go index 362ae0a137ba..f87ecfe58467 100644 --- a/metricbeat/module/prometheus/collector/collector_test.go +++ b/metricbeat/module/prometheus/collector/collector_test.go @@ -155,7 +155,7 @@ func TestGetPromEventsFromMetricFamily(t *testing.T) { }, { data: common.MapStr{ - "http_request_duration_microseconds": uint64(10), + "http_request_duration_microseconds_bucket": uint64(10), }, labels: common.MapStr{"le": "0.99"}, }, diff --git a/metricbeat/module/prometheus/collector/data.go b/metricbeat/module/prometheus/collector/data.go index 0120aa55db30..a2e191d33092 100644 --- a/metricbeat/module/prometheus/collector/data.go +++ b/metricbeat/module/prometheus/collector/data.go @@ -115,7 +115,7 @@ func getPromEventsFromMetricFamily(mf *dto.MetricFamily) []PromEvent { events = append(events, PromEvent{ data: common.MapStr{ - name: bucket.GetCumulativeCount(), + name + "_bucket": bucket.GetCumulativeCount(), }, labels: bucketLabels, })