오늘의 인기 글
최근 글
최근 댓글
Today
Total
04-29 01:41
관리 메뉴

우노

[Prometheus] Config의 scrape_configs 설정 시 static_configs의 targets 설정 방법 본문

DevOps/Prometheus

[Prometheus] Config의 scrape_configs 설정 시 static_configs의 targets 설정 방법

운호(Noah) 2023. 11. 15. 15:34

들어가기 앞서,

  • 해당 포스팅에선, Prometheus Config의 scrape_configs 설정 시 static_configs의 targets을 어떻게 설정해야하는지에 대해서 다뤄보겠습니다.

Prometheus Config File 예제 코드

global:
  scrape_interval: 30s
  evaluation_interval: 30s
  scrape_timeout: 10s

scrape_configs:
  - job_name: 'Test'
    static_configs:
      - targets: ['12.34.567.890:8086']
  • http://12.34.567.890:8086/metrics”라는 경로에서 metrics를 scrape 해오고 싶다면,
  • targets에는 “http://”와 “/metrics”를 제외한 “12.34.567.890:8086”만 적어도 됩니다.
    • scheme의 기본값은 “http”이며, metrics_path의 기본 경로는 “/metrics”이기 때문입니다.

'DevOps > Prometheus' 카테고리의 다른 글

[Prometheus] Dashboard에 Basic Auth 적용하는 방법  (0) 2023.10.20
Comments