프로메테우스(prometheus) 설치하기
오픈소스 모니터링 솔루션인 프로메테우스를 활용하여 도커 컨테이너 지표를 수집하고 확인하려고 한다.
다운로드
아래 페이지에 접속해서 본인이 사용하고자 하는 환경에 맞는 파일을 다운로드 받아준다.
https://prometheus.io/download/
Download | Prometheus
An open-source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach.
prometheus.io
압축해제
위에서 다운받은 파일의 압축을 풀어준다.
tar xvfz prometheus-*.tar.gz
cd prometheus-*
아래 이미지와 같이 파일이 구성되어 있는것을 확인할 수 있다.
Docker 에서 설치하기
제일 기본으로 설치하는 명령어는 아래 명령어를 사용하면 된다.
docker run --name prometheus -d -p 9090:9090 prom/prometheus
볼륨을 설정해서 사용하기 위해 아래와 같이 사용한다.
docker run \
--name prometheus -d \
-p 9090:9090 \
-v /path/to/prometheus.yml:/etc/prometheus/prometheus.yml \
prom/prometheus
내용이 이해가 가지 않으면 아래 사이트를 참고해도 된다.
https://prometheus.io/docs/prometheus/latest/getting_started/
Getting started | Prometheus
An open-source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach.
prometheus.io
https://prometheus.io/docs/prometheus/latest/installation/
Installation | Prometheus
An open-source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach.
prometheus.io