본문 바로가기
prometheus

docker - prometheus 연결하기

by 앵남(Andy) 2022. 1. 19.
global:
  scrape_interval:     15s
  evaluation_interval: 30s
  # scrape_timeout is set to the global default (10s).

scrape_configs:
  - job_name: 'prometheus'
    static_configs:
    - targets: ['localhost:9090']
  # 모니터링 하려는 docker container image name 
  - job_name: 'js-fastapi-monitoring_web'
    honor_labels: true
    static_configs:
      - targets: ['host.docker.internal:5000']

docker run -d --name=prometheus -p 9090:9090 -v <prometheus 있는 경로>:/etc/prometheus/prometheus.yml prom/prometheus --config.file=/etc/prometheus/prometheus.yml

 

'prometheus' 카테고리의 다른 글

prometheus localhost:port connection refused 해결법  (3) 2022.01.19

댓글