# Help: I want to configure Node-RED for monitoring with Prometheus and Node Exporter | Docker

**URL:** <https://discourse.nodered.org/t/help-i-want-to-configure-node-red-for-monitoring-with-prometheus-and-node-exporter-docker/85558>\
**Category:** General\
**Tags:** docker\
**Created:** [15 February 2024 10:49 UTC](https://discourse.nodered.org/t/help-i-want-to-configure-node-red-for-monitoring-with-prometheus-and-node-exporter-docker/85558 "2024-02-15T10:49:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![for\_iot](https://avatars.discourse-cdn.com/v4/letter/f/43a26b/32.png) [@for\_iot](https://discourse.nodered.org/u/for_iot)\
**Post date:** [15 February 2024 10:49 UTC](https://discourse.nodered.org/t/help-i-want-to-configure-node-red-for-monitoring-with-prometheus-and-node-exporter-docker/85558/1 "2024-02-15T10:49:23Z")

</div>

**Please help: I want to configure Node-RED for monitoring with Prometheus and Node Exporter**

The goal is to monitor Node-RED server and Prometheus server and follow if they work correctly, and visual there metrics in Garana.

I am using docker to run **Node-RED** and **Grafana** and **Prometheus** and **Node Exporter**.  
This is `docker-compose.yml` :

```auto
version: '3'

services:

  grafana:
    image: grafana/grafana-enterprise
    container_name: grafana
    ports:
      - "3000:3000"
    depends_on:
      - influxdb
    networks:
      - iot-network
    environment:
      - GF_SECURITY_ADMIN_USER=admin
      - GF_SECURITY_ADMIN_PASSWORD=admin
      - GF_INSTALL_PLUGINS=
    volumes:
      - grafana_data:/var/lib/grafana

  nodered:
    image: nodered/node-red:latest
    container_name: nodered
    ports:
      - "1880:1880"
    networks:
      - iot-network

  prometheus:
    image: prom/prometheus:latest
    container_name: prometheus
    ports:
    - 9090:9090
    command:
    - --config.file=/etc/prometheus/prometheus.yml
    volumes:
    - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
    depends_on:
    - node_exporter
    networks:
      - iot-network

  node_exporter:
    image: quay.io/prometheus/node-exporter:latest
    container_name: node_exporter
    ports:
    - 9100:9100
    command:
      - '--path.rootfs=/host'
    volumes:
      - '/:/host:ro,rslave'
    networks:
      - iot-network

networks:
  iot-network:
    driver: bridge

volumes: 
  grafana_data: {}

```

and this is `prometheus.yml` :

```auto
global:
  scrape_interval: 5s

scrape_configs:
  - job_name: 'prometheus' # no problems, it works
    static_configs:
      - targets: ['prometheus:9090']

  - job_name: 'node_exporter' # no problems, it works
    static_configs:
      - targets: ['node_exporter:9100']

  - job_name: 'nodered' # !!! NOT works !!!
    static_configs:
      - targets: ['nodered:1880']

  - job_name: 'grafana' # no problems, it works
    static_configs:
      - targets: ['grafana:3000']

```

the `docker-compose.yml` and `prometheus.yml` are in the same folder.  
then I run `docker-compose up` , and create the containers,

but I have problem with Node-RED server:  
this image from web interface of prometheus [http://localhost:9090/targets](http://localhost:9090/targets) :

 ![Screenshot 2024-02-15 at 11-45-34 Prometheus Time Series Collection and Processing Server](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/8/68e508c12a6644f0f60633d105505109d89457fa.png)

---

<div class="post-metadata">

**Author:** ![greengolfer](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/greengolfer/32/28276_2.png) [@greengolfer](https://discourse.nodered.org/u/greengolfer)\
**Post date:** [16 February 2024 07:27 UTC](https://discourse.nodered.org/t/help-i-want-to-configure-node-red-for-monitoring-with-prometheus-and-node-exporter-docker/85558/2 "2024-02-16T07:27:47Z")

</div>

I don't think that, by default, node-red exposes metrics...  
You would have to install [node-red-contrib-prometheus-exporter (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-prometheus-exporter) and configure the metrics you want to get in prometheus.

---

<div class="post-metadata">

**Author:** ![for\_iot](https://avatars.discourse-cdn.com/v4/letter/f/43a26b/32.png) [@for\_iot](https://discourse.nodered.org/u/for_iot)\
**Post date:** [21 February 2024 08:44 UTC](https://discourse.nodered.org/t/help-i-want-to-configure-node-red-for-monitoring-with-prometheus-and-node-exporter-docker/85558/3 "2024-02-21T08:44:46Z")

</div>

Thank you @greengolfer for your response. I appreciate it.  
I will explore the option of using node-red-contrib-prometheus-exporter (node) for Node-RED.  
Thanks again!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 May 2024 08:45 UTC](https://discourse.nodered.org/t/help-i-want-to-configure-node-red-for-monitoring-with-prometheus-and-node-exporter-docker/85558/4 "2024-05-21T08:45:12Z")

</div>

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