# How can I enable Prometheus extension in docker Hivemq image?

**URL:** <https://community.hivemq.com/t/how-can-i-enable-prometheus-extension-in-docker-hivemq-image/975>\
**Category:** HiveMQ Extensions\
**Created:** [January 27, 2022, 12:22pm UTC](https://community.hivemq.com/t/how-can-i-enable-prometheus-extension-in-docker-hivemq-image/975 "2022-01-27T12:22:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@Rahul](https://community.hivemq.com/u/Rahul)\
**Post date:** [January 27, 2022, 12:22pm UTC](https://community.hivemq.com/t/how-can-i-enable-prometheus-extension-in-docker-hivemq-image/975/1 "2022-01-27T12:22:22Z")

</div>

How can I enable prometheus extension in docker Hivemq image ?

---

<div class="post-metadata">

**Author:** ![SShet](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@SShet](https://community.hivemq.com/u/SShet)\
**Post date:** [January 27, 2022, 2:41pm UTC](https://community.hivemq.com/t/how-can-i-enable-prometheus-extension-in-docker-hivemq-image/975/2 "2022-01-27T14:41:08Z")

</div>

Hello Rahul,

Do you want to enable the Prometheus extension for HiveMQ deployed using docker? if yes then you will need to build a custom image where the base will be a hivemq image and then copy the Prometheus extension to the extension folder. Please refer sample snippet

```auto
ARG TAG=4.7.3

FROM hivemq/hivemq4:${TAG}

...
COPY --chown=hivemq:hivemq hivemq-prometheus-extension extensions/hivemq-prometheus-extension
...

```

I hope this helps.

Kind regards,  
Sheetal

---

<div class="post-metadata">

**Author:** ![Rahul](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@Rahul](https://community.hivemq.com/u/Rahul)\
**Post date:** [January 27, 2022, 3:54pm UTC](https://community.hivemq.com/t/how-can-i-enable-prometheus-extension-in-docker-hivemq-image/975/3 "2022-01-27T15:54:25Z")

</div>

I would like to know, How it will work like it will new separate instance for prometheus ?

Because I have existing one prometheus setup us running that’s where I want to point this one.

Thanks,  
Rahul

---

<div class="post-metadata">

**Author:** ![SShet](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@SShet](https://community.hivemq.com/u/SShet)\
**Post date:** [February 24, 2022, 2:47pm UTC](https://community.hivemq.com/t/how-can-i-enable-prometheus-extension-in-docker-hivemq-image/975/4 "2022-02-24T14:47:21Z")

</div>

Hello Rahul,

When you enable Prometheus extension for HiveMQ broker then it allows HiveMQ to expose metrics to a Prometheus application. Since you already have Prometheus setup, to gather HiveMQ metrics you will need to add a scrape configuration to your Prometheus configuration. i.e `prometheus.yml`  
Please check here for minimal Prometheus [configurations](https://www.hivemq.com/docs/hivemq/4.7/user-guide/monitoring.html#_install_prometheus).

Kind regards  
Sheetal
