Prometheus + Grafana - ์ฐ๊ฒฐ
2023. 7. 31. 10:38ใ๊ฐ๋ฐ/Monitoring
728x90
๋ฐ์ํ
๐ก ์ค๋น๋ฌผ : ubuntu
์ค์น
# Grafana ์ค์น
wget <https://dl.grafana.com/oss/release/grafana_8.5.2_amd64.deb>
sudo dpkg -i grafana_8.5.2_amd64.deb
# Prometheus ์ค์น
wget <https://github.com/prometheus/prometheus/releases/download/v2.35.0/prometheus-2.35.0.linux-amd64.tar.gz>
tar xvfz prometheus-2.35.0.linux-amd64.tar.gz
mv prometheus-2.35.0.linux-amd64.tar.gz prometheus
๋ชจ๋ํฐ๋ง ๋์ ์ค์
RabbitMQ Plugin ํ์ฑํ
# rabbitmq_prometheus plugin ์ ํ์ฑํ์ํค๋ฉฐ exporter ํฌํธ๋ 15692 ์ด๋ค
sudo rabbitmq-plugins list
sudo rabbitmq-plugins enable rabbitmq_prometheus
์ค์
prometheus.yml ์ค์ ํ์ผ
- ์ํ๋ ์๋น์ค๋ฅผ ๋ชจ๋ํฐ๋ง ๋ฐ์ดํฐ ๋ฑ๋ก, ํด์ ๊ฐ๋ฅ
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ["localhost:9090"]
์คํ
# Promeheus ์คํ ๋ช
๋ น์ด
./prometheus/prometheus
# Grafana ์คํ ๋ช
๋ น์ด
service grafana-server start
# ๋ฐฉํ๋ฒฝ ์คํ
firewall-cmd --permanent --zone=public --add-port=3000/tcp
firewall-cmd --permanent --zone=public --add-port=9090/tcp
firewall-cmd --reload
์คํ ํ๋ฉด
Grafana + Prometheus ์ฐ๊ฒฐ
URL ๊ฐ์ Prometheus URL ์์ฑ ํ Save & Test ํด๋ฆญ
728x90
๋ฐ์ํ
'๊ฐ๋ฐ > Monitoring' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Prometheus + Grafana - RabbitMQ ๊ตฌ์ถ (0) | 2023.07.31 |
---|---|
Prometheus + Grafana - Redis ๊ตฌ์ถ (0) | 2023.07.31 |
Prometheus, Grafana - ์ด๋ก (0) | 2023.07.31 |