# Prometheus module is not working

**URL:** https://discuss.elastic.co/t/prometheus-module-is-not-working/161988
**Category:** Beats
**Tags:** metricbeat
**Created:** [December 24, 2018, 9:12am UTC](https://discuss.elastic.co/t/prometheus-module-is-not-working/161988 "2018-12-24T09:12:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![oldcodeoberyn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oldcodeoberyn/32/24800_2.png) [@oldcodeoberyn](https://discuss.elastic.co/u/oldcodeoberyn)
#### Post date: [December 24, 2018, 9:12am UTC](https://discuss.elastic.co/t/prometheus-module-is-not-working/161988/1 "2018-12-24T09:12:43Z")

</div>

I test on V6.4.3 and V6.5.0.

## First of all, the configuration template in `prometheus.yml.disabled` is wrong.

if we enable this module by mv `prometheus.yml.disabled` to `prometheus.yml`, will print ERROR as below

```auto
2018-12-24T17:08:04.726+0800	ERROR	instance/beat.go:764	Exiting: 1 error: 1 error: missing required field accessing '0.namespace' (source:'/etc/metricbeat/modules.d/prometheus.yml')

```

we should use the configuration describe in docs:

```auto
metricbeat.modules:
- module: prometheus
  metricsets: ["stats"]
  enabled: true
  period: 10s
  hosts: ["localhosts:3816"]
  #metrics_path: /metrics
  #namespace: example

```

## second, it is not working

I start a promethus exporter: `/opt/monitor/prometheus/prometheus_node_exporter/node_exporter -web.listen-address=:3816`  
and use above configuration. metricbeat could start, but no output from the prometheus modules

---

<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: [December 31, 2018, 10:18pm UTC](https://discuss.elastic.co/t/prometheus-module-is-not-working/161988/2 "2018-12-31T22:18:00Z")

</div>

Hi @oldcodeoberyn, sorry for the late response. How did you move prometheus.yml.disabled to prometheus.yml? Did you use the `./metricbeat modules enable prometheus` command?

---

<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: [January 28, 2019, 10:18pm UTC](https://discuss.elastic.co/t/prometheus-module-is-not-working/161988/3 "2019-01-28T22:18:04Z")

</div>

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