본문 바로가기
Q&A2022년 12월 4일1분 읽기

Prometheus와 Grafana로 모니터링 대시보드 만들기

배
배준호
조회 794댓글 1

Prometheus + Grafana로 서버 모니터링 대시보드를 만드는 기본 방법을 알려주세요.

댓글 1

김김영삼3년 전

Prometheus + Grafana 기본 구축:

# docker-compose.yml
services:
prometheus:
image: prom/prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"

grafana:
image: grafana/grafana
ports:
- "3000:3000"

node-exporter:
image: prom/node-exporter
ports:
- "9100:9100"
# prometheus.yml
scrape_configs:
- job_name: "node"
static_configs:
- targets: ["node-exporter:9100"]

설정 순서:

  1. docker compose up -d
  2. Grafana (localhost:3000) 접속 (admin/admin)
  3. Data Source → Prometheus (http://prometheus:9090) 추가
  4. Dashboard → Import → ID 1860 (Node Exporter Full)

5분이면 서버 모니터링 대시보드가 완성됩니다.

Ctrl+Enter로 등록