diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 13b6ac0747e..b32541f5210 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -197,6 +197,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Collect metrics when EC2 instances are not in running state. {issue}11008[11008] {pull}11023[11023] - Change ECS field cloud.provider to aws. {pull}11023[11023] - Add documentation about jolokia autodiscover fields. {issue}10925[10925] {pull}10979[10979] +- Add _bucket to histogram metrics in Prometheus Collector {pull}11578[11578] *Packetbeat* diff --git a/metricbeat/module/prometheus/collector/collector_test.go b/metricbeat/module/prometheus/collector/collector_test.go index 362ae0a137b..f87ecfe5846 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 0120aa55db3..a2e191d3309 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, })