# I can't connect my Prometheus to the metrics of my node

**URL:** <https://discuss.prometheus.io/t/i-cant-connect-my-prometheus-to-the-metrics-of-my-node/2326>\
**Category:** Prometheus server\
**Created:** [July 1, 2024, 1:54pm UTC](https://discuss.prometheus.io/t/i-cant-connect-my-prometheus-to-the-metrics-of-my-node/2326 "2024-07-01T13:54:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dauid64](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/dauid64/32/1003_2.png) [@dauid64](https://discuss.prometheus.io/u/dauid64)\
**Post date:** [July 1, 2024, 1:54pm UTC](https://discuss.prometheus.io/t/i-cant-connect-my-prometheus-to-the-metrics-of-my-node/2326/1 "2024-07-01T13:54:54Z")

</div>

I am configuring my node this way

```javascript
import { NodeSDK } from "@opentelemetry/sdk-node";
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-grpc";
import { Resource } from "@opentelemetry/resources";
import {
  SEMRESATTRS_SERVICE_NAME,
  SEMRESATTRS_SERVICE_VERSION,
  SEMRESATTRS_SERVICE_NAMESPACE
} from "@opentelemetry/semantic-conventions";
import { getNodeAutoInstrumentations } from "@opentelemetry/auto-instrumentations-node";
import { trace } from "@opentelemetry/api";
import { PrometheusExporter } from "@opentelemetry/exporter-prometheus";
import { MeterProvider } from "@opentelemetry/sdk-metrics";

const OTLP_EXPORTER_URL = process.env.OTLP_EXPORTER_URL || "http://localhost:4317";

// OpenTelemtry
const sdk = new NodeSDK({
  traceExporter: new OTLPTraceExporter({
    url: OTLP_EXPORTER_URL
  }),
  metricReader: new PrometheusExporter(),
  resource: new Resource({
    [SEMRESATTRS_SERVICE_NAMESPACE]: "servopa-victoria-backend",
    [SEMRESATTRS_SERVICE_NAME]: "servopa-victoria-backend",
    [SEMRESATTRS_SERVICE_VERSION]: "1.0"
  }),
  instrumentations: [getNodeAutoInstrumentations()]
});
sdk.start();

```

and my Prometheus in Docker.

```yml
prometheus:
    image: prom/prometheus:v2.47.2
    user: root
    ports:
      - 9090:9090
    extra_hosts:
      - host.docker.internal:host-gateway
    command:
      - --config.file=/etc/prometheus/prometheus.yml
    volumes:
      - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
      - ./prometheus/prometheus-data:/prometheus

```

prometheus.yml

```yml
global:
  scrape_interval: 15s

scrape_configs:
  - job_name: cadvisor
    static_configs:
      - targets:
        - cadvisor:8080
  - job_name: nodejs_exporter
    static_configs:
      - targets:
        - host.docker.internal:9464

```

In Prometheus, it is reporting the following error

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/prometheus/original/2X/f/f9c57092bb496495f86c6e7361d1ed1745950ba4.png)
