HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🤩
개발
/데이터베이스(Database)/
Database
Database
/
Prometheus
Prometheus
/
Overview

Overview

What is Prometheus?Main FeatureComponentArchitectureGlossary(용어사전)

What is Prometheus?

metric(=지표), time series data(시계열 데이터)
  • 프로메테우스는 metric을 time series data로서 수집하고 저장함
    • 즉, 지표 정보가 timestamp와 같이 저장이 되고, key-value 쌍인 label도 함께 저장될 수 있음

Main Feature

  • metric 이름과 key/value pair로 식별되는 시계열 정보가 포함된 다차원의 data model
  • PromQL, 이러한 다차원성의 복잡도를 줄이기 위한 유연한 쿼리 언어
  • 분산 storage 의존 x. 하나의 서버 노드로 운용되어 autonomous함(자율적)
  • 시계열 수집은 HTTP를 통한 pull 방식을 통해 이루어짐
  • pushing timeseries는 중간 gateway를 통해 지원됨(pushgateway)
  • 대상(target)은 정적 설정이나 서비스 디스커버리 방식으로 찾아짐

Component

  • main Prometheus server (시계열 데이터 스크래핑, 저장)
  • client library (application code)
  • push gateway (for supporting short-lived jobs)
  • exporter
  • various support tools

Architecture

notion image
  • 프로메테우스는 instrumented jobs로부터 지표를 스크래핑함(직접적으로 할 수도 있고, 중간자인 push gateway를 통해서 할 수도 있음)
  • 그리고 스크래핑된 샘플 데이터를 로컬에 저장 & rule을 적용하여 aggregate된 새로운 시계열 데이터를 만듦 & 알림 생성을 함
  • Grafana 혹은 다른 API consumer가 수집된 데이터를 가시화 할 수 있음

Glossary(용어사전)

[ Prometheus Docs ] GLOSSARY
  • Exporter : 지표를 얻고 싶은 application과 함께 도는 binary 파일. exporter를 통해 non-Prometheus 형식에서 Prometheus가 지원하는 형식으로 변환해주고 Prometheus에 노출시켜줌
  • Collector : exporter의 한 부분으로 metric의 집합을 나타냄. 직접적인 계측이라면 single metric일 수도 있고, 다른 시스템으로부터 metric을 당겨온다면 다수의 metric일 수도 있음
  • Job : 공동의 목적을 가진 target의 집합
  • Instance : job 안에서 target을 고유하게 식별할 수 있는 식별자(label). an endpoint you can scrape. usually corresponding to a single process
  • Target : 스크래핑할 대상
  • Pushgateway : pushgateway는 metric의 가장 최근 push에 대한 정보만을 지속시킴. 이는 해당 작업이 종료된 이후에도 프로메테우스가 해당 지표를 스크래핑 할 수 있도록 해줌