title: prometheus cannot reach node exporter
body: <p>I am learning prometheus and node_exporter and trying to set up them locally by docker.
  I downloaded docker images from this <a href="https://hub.docker.com/r/prom/node-exporter" rel="nofollow noreferrer">https://hub.docker.com/r/prom/node-exporter</a> and this <a href="https://hub.docker.com/r/prom/prometheus" rel="nofollow noreferrer">https://hub.docker.com/r/prom/prometheus</a>, then run them with commands:</p>
  <pre><code>docker run -d -p 9100:9100 prom/node-exporter
  
  docker run \
      -d \
      -p 9090:9090 \
      -v /Users/person/sandbox/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml \
      prom/prometheus
  </code></pre>
  <p>before running prometheus I added yml file:</p>
  <pre><code>global:
    scrape_interval:     15s
    evaluation_interval: 15s
  
  scrape_configs:
  - job_name: 'node'
    static_configs:
    - targets: ['localhost:9100']
  </code></pre>
  <p>But it seems that prometheus can not reach node_export. I see metrics from node_export -&gt;
  <a href="https://i.stack.imgur.com/FYXPz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FYXPz.png" alt="enter image description here" /></a></p>
  <p>and I see metrics from prometheus -&gt;
  <a href="https://i.stack.imgur.com/LUrsL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LUrsL.png" alt="enter image description here" /></a></p>
  <p>but I cannot get node_export metrics from prometheus web-browser from:</p>
  <p><a href="https://i.stack.imgur.com/1tWTN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1tWTN.png" alt="enter image description here" /></a></p>
  <p>By the way prometheus read yml file:
  <a href="https://i.stack.imgur.com/yUgtK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yUgtK.png" alt="enter image description here" /></a></p>
  <p>What did I wrong?</p>
  <p>UDP: nice, it seems that localhost:9100 is unreachable
  <a href="https://i.stack.imgur.com/jbukA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jbukA.png" alt="enter image description here" /></a></p>