# How to visualize Metricbeat Prometheus histograms

**URL:** https://discuss.elastic.co/t/how-to-visualize-metricbeat-prometheus-histograms/232074
**Category:** Kibana
**Created:** [May 11, 2020, 4:25pm UTC](https://discuss.elastic.co/t/how-to-visualize-metricbeat-prometheus-histograms/232074 "2020-05-11T16:25:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![iulian7](https://avatars.discourse-cdn.com/v4/letter/i/9dc877/32.png) [@iulian7](https://discuss.elastic.co/u/iulian7)
#### Post date: [May 11, 2020, 4:25pm UTC](https://discuss.elastic.co/t/how-to-visualize-metricbeat-prometheus-histograms/232074/1 "2020-05-11T16:25:41Z")

</div>

Hello,

Elastic offers a Prometheus Metricbeat ([https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-prometheus.html](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-prometheus.html)) module that scrapes a Prometheus `/metrics` endpoint and pushes the metrics to an Elastic Cloud endpoint. This is all working fine.

How is it possible to visualise Prometheus histograms in Kibana? There is a Prometheus scraping example ([https://github.com/elastic/examples/tree/master/scraping-prometheus-k8s-with-metricbeat](https://github.com/elastic/examples/tree/master/scraping-prometheus-k8s-with-metricbeat)) but this only shows how to visualise a `count` metric.

Prometheus histograms are already bucketed using a `le` (less than or equal to) field. Each bucket contains a count of events that are "less than or equal to" that bucket. The last bucket is always `+Inf` which will always contain all counts (as everything is "less than or equal to" infinity).

Some example documents that arrive from the Prometheus metricbeat:

```
{
  "_index": "metricbeat-7.6.2-2020.05.10-000001",
  "_type": "_doc",
  "_version": 1,
  "_score": null,
  "_source": {
    "prometheus": {
      "labels": {
        "le": "0.064"
      },
      "metrics": {
        "latency1_seconds_bucket": 17
      }
    }
  }
}

{
  "_index": "metricbeat-7.6.2-2020.05.10-000001",
  "_type": "_doc",
  "_version": 1,
  "_score": null,
  "_source": {
    "prometheus": {
      "labels": {
        "le": "0.128"
      },
      "metrics": {
        "latency1_seconds_bucket": 23
      }
    }
  }
}

```

The above documents mean 17 events took \<= 0.064 seconds and 23 events took \<= 0.128 seconds. This means 6 events took between 0.064 and 0.128 seconds.

How is it possible to plot something like a percentile of latencies out of this data? I couldn't find any documentation about this in the Metricbeat examples/docs.

Thank you,  
Iulian

---

<div class="post-metadata">

### Author: ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)
#### Post date: [May 11, 2020, 4:38pm UTC](https://discuss.elastic.co/t/how-to-visualize-metricbeat-prometheus-histograms/232074/2 "2020-05-11T16:38:24Z")

</div>

This will be supported in 7.7.0 when it releases soon, this is the PR that introduces it:

> <https://github.com/elastic/kibana/pull/59387>

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 8, 2020, 4:38pm UTC](https://discuss.elastic.co/t/how-to-visualize-metricbeat-prometheus-histograms/232074/3 "2020-06-08T16:38:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
