Prometheus target not getting identified

63 Views Asked by At

It seems that my target is not getting scraped by prometheus (it does not show up in my targets list). My target is a Raspberry Pi with node exporter configured - I verified that I am able to see the metrics being exposed by my target.

Here is my prometheus config:

global:
  scrape_interval: 5s
scrape_configs:
 - job_name: prometheus
   static_configs:
    - targets: ['localhost:9090']
      labels:
         group: 'localhost'

    
    - targets: ['192.168.254.92:9100']
      labels:
         group: 'RSP'

what is wrong with my config or setup?

1

There are 1 best solutions below

0
saned On

Figured out the issue. The bind mount was pointing to the wrong configuration file on the prometheus Docker instance:

docker run --rm --detach --name prometheushomenet --publish 9090:9090 --volume prometheus-volume:/prometheus  --volume "$(pwd)"/Desktop/Prometheus/prometheus.yml:/etc/prometheus/prometheus.ym prom/prometheus