# Prometheus module stop working with new metrics format

**URL:** https://discuss.elastic.co/t/prometheus-module-stop-working-with-new-metrics-format/199069
**Category:** Beats
**Tags:** metricbeat
**Created:** [September 11, 2019, 11:29am UTC](https://discuss.elastic.co/t/prometheus-module-stop-working-with-new-metrics-format/199069 "2019-09-11T11:29:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Angel\_Luis\_Gonzalez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/angel_luis_gonzalez/32/45644_2.png) [@Angel\_Luis\_Gonzalez](https://discuss.elastic.co/u/Angel_Luis_Gonzalez)
#### Post date: [September 11, 2019, 11:29am UTC](https://discuss.elastic.co/t/prometheus-module-stop-working-with-new-metrics-format/199069/1 "2019-09-11T11:29:18Z")

</div>

I used to have an thirdparty prometheus exporter (Microprofile metrics) and the prometheus metricbeat module worked fine. Here an example of the working format:

```
# HELP base:thread_max_count Displays the peak live thread count since the Java virtual machine started or peak was reset. This includes daemon and non-daemon threads.
# TYPE base:thread_max_count counter
base:thread_max_count 79.0
# HELP base:cpu_available_processors Displays the number of processors available to the Java virtual machine. This value may change during a particular invocation of the virtual machine.
# TYPE base:cpu_available_processors gauge
base:cpu_available_processors 1.0
# HELP base:thread_daemon_count Displays the current number of live daemon threads.
# TYPE base:thread_daemon_count counter
base:thread_daemon_count 26.0

```

But now i have updated the exporter and metricbeat stopped working. When I run this test:

`metricbeat test modules -v`

The response is:

```
prometheus...
  collector...
    error... ERROR timeout waiting for an event

```

Here an example of the format of the new exporter:

```
# HELP base:thread_max_count Displays the peak live thread count since the Java virtual machine started or peak was reset. This includes daemon and non-daemon threads.
# TYPE base:thread_max_count counter
base:thread_max_count 79.0
# HELP base_thread_daemon_count Displays the current number of live daemon threads.
# TYPE base_thread_daemon_count gauge
base_thread_daemon_count 7.0

```

How can I at least debug this error?

---

<div class="post-metadata">

### Author: ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)
#### Post date: [September 24, 2019, 5:20pm UTC](https://discuss.elastic.co/t/prometheus-module-stop-working-with-new-metrics-format/199069/2 "2019-09-24T17:20:28Z")

</div>

Hmm what version of metricbeat are you running?  
I tested on master branch with adding your new exporter format example into `github.com/elastic/beats/metricbeat/module/prometheus/collector/_meta/testdata/docs.plain`:

```auto
# HELP base:thread_max_count Displays the peak live thread count since the Java virtual machine started or peak was reset. This includes daemon and non-daemon threads.
# TYPE base:thread_max_count counter
base:thread_max_count 79.0
# HELP base_thread_daemon_count Displays the current number of live daemon threads.
# TYPE base_thread_daemon_count gauge
base_thread_daemon_count 7.0

```

and after running `go test -generate`, I can see in `github.com/elastic/beats/metricbeat/module/prometheus/collector/_meta/testdata/docs.plain-expected.json`:

```auto
[
    {
        "event": {
            "dataset": "prometheus.collector",
            "duration": 115000,
            "module": "prometheus"
        },
        "metricset": {
            "name": "collector",
            "period": 10000
        },
        "prometheus": {
            "metrics": {
                "base:thread_max_count": 79,
                "base_thread_daemon_count": 7
            }
        },
        "service": {
            "address": "127.0.0.1:55555",
            "type": "prometheus"
        }
    }
]

```

---

<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: [October 22, 2019, 5:20pm UTC](https://discuss.elastic.co/t/prometheus-module-stop-working-with-new-metrics-format/199069/3 "2019-10-22T17:20:29Z")

</div>

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