Prometheus

Prometheus란?

Prometheus는 오픈 소스이며, Apach2 라이센스로 공개 되어 있기에 유료 걱정 없이 사용이 가능합니다.
Pasted image 20230622125835.png

Exporter

Prometheus Server

Prometheus.yml

# 전역 설정
global:
  scrape_interval:     15s # 15초마다 매트릭을 수집한다. 기본은 1분.
  evaluation_interval: 15s # 15초마다 규칙을 평가한다. 기본은 1분.

  # 외부 시스템에 표시할 이 서버의 레이블
  external_labels:
      monitor: 'codelab-monitor'

# 규칙을 로딩하고 'evaluation_interval' 설정에 따라 정기적으로 평가한다.
rule_files:
  # - "first.rules"
  # - "second.rules"

# 매트릭을 수집할 엔드포인드로 여기선 Prometheus 서버 자신을 가리킨다.
scrape_configs:
  # 이 설정에서 수집한 타임시리즈에 `job=<job_name>`으로 잡의 이름을 설정한다.
  - job_name: 'prometheus'

    # metrics_path의 기본 경로는 '/metrics'이고 scheme의 기본값은 `http`다

    static_configs:
      - targets: ['localhost:9090']

global

rule_files

scrape_configs

target

scrapte_config


해당 내용은 확인이 필요

Exporter

scrape_configs:
  - job_name: 'prometheus'

    static_configs:
      - targets: ['localhost:9090']
  - job_name: 'test-server'

    scrape_interval: 10s

    static_configs:
      - targets: ['52.69.72.174:9100']

표현식 언어


#Monitoring #Prometheus