Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
sansae@sansaeubuntu:~/prometheus-course/scripts$ docker run -itd -p 9100:9100 --name exporter prom/node-exporter:latest
sansae@sansaeubuntu:~/prometheus-course/scripts$ docker rm -f prometheus
sansae@sansaeubuntu:~/prometheus-course/scripts$ docker run -d --name prometheus --link exporter -p 9090:9090 prom/prometheus
sansae@sansaeubuntu:~/prometheus-course/scripts$ docker exec -it prometheus sh
/prometheus $ vi /etc/prometheus/prometheus.yml

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  - job_name: 'node_exporter'
    scrape_interval: 5s
    static_configs:
      - targets: ['exporter:9100']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/prometheus $ exit
sansae@sansaeubuntu:~/prometheus-course/scripts$ docker stop prometheus
prometheus
sansae@sansaeubuntu:~/prometheus-course/scripts$ docker start prometheus
prometheus
sansae@sansaeubuntu:~/prometheus-course/scripts$ curl ifconfig.me
20.194.55.215

...