Prometheus + Grafana (ing...)¶
Set up¶
- Docker Desktop:
설정
-Docker Engine
- Linux:
/etc/docker/daemon.json
아래 두 가지 설정 추가
docker-compose.yml
version: "3.9"
services:
api-web:
build: .
environment:
- NUM=4000
ports:
- "13583:13583"
command:
- "uvicorn"
- "app.main:app"
- "--host"
- "0.0.0.0"
- "--port"
- "13583"
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
depends_on:
- prometheus
http://localhost:9323/metrics
¶
: 도커 엔진이 HTTP API를 통해 외부로 공개하는 상태 정보
Prometheus http://localhost:9090
¶
: Prometheus Web UI
http://localhost:9090/metrics
¶
: promethues.yml 설정을 통해 수집한 측정값
Grafana http://localhost:3000
¶
초기 암호: admin/admin
Add your fisrt data source
클릭Prometheus
선택- HTTP - URL에 Prometheus 서버 정보 입력
Save & test
- Create Dashboard (Grafana Example Dashboard - Promethues 2.0 Stats)
Quote
- Github