본문 바로가기

MSA

41. Prometheus & Grafana 설치

1. 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

나는 mac이라 darwin 다운로드 및 압축해제

2. grafana 설치 : https://grafana.com/grafana/download

 

Download Grafana | Grafana Labs

Overview of how to download and install different versions of Grafana on different operating systems.

grafana.com

다운로드: curl -O https://dl.grafana.com/enterprise/release/grafana-enterprise-9.3.2.darwin-amd64.tar.gz

압축해제: tar -zxvf grafana-enterprise-9.3.2.darwin-amd64.tar.gz

3. prometheus.yml 수집대상 추가

아래 job_name 추가

4. prometheus 실행

./prometheus --config.file=prometheus.yml

실행시 인증관련 오류발생하면 개인정보 보호및 보안에서 허용
.bash_profile에 alias 등록후 기동 9090포트로 기동됨
prometheus 기동모습

5. grafana 실행

./bin/grafana-server

grafana 기동모습