jiminchur / PlayData-28_Smart-Closet

[Project] 2024.02.19~2024.03.22
0 stars 0 forks source link

[DB] Monitoring #12

Open jiminchur opened 8 months ago

jiminchur commented 8 months ago

[Dashborad 구축]

jiminchur commented 7 months ago

[Granfana 설치 (docker)]

docker run -d -p 3000:3000 grafana/grafana
jiminchur commented 7 months ago

[Prometheus 설치] -> 추후에 docker로 이전

wget https://github.com/prometheus/prometheus/releases/download/v2.50.1/prometheus-2.50.1.linux-amd64.tar.gz

tar xzvf prometheus-2.50.1.linux-amd64.tar.gz

mv ./prometheus-2.50.1.linux-amd64.tar.gz ./prometheus

./prometheus

* url 접속

<img width="763" alt="스크린샷 2024-03-11 오후 4 42 45" src="https://github.com/jiminchur/Closet_Cody_recommendModel/assets/145955453/93ec5f07-d334-4087-ba80-36318b691fce">
jiminchur commented 7 months ago

[mysqld-expoter설치] -> 추후에 docker 로 이전

tar xvfz mysqld_exporter-0.15.0.linux-amd64.tar.gz

mv ./mysqld_exporter-0.15.0.linux-amd64 ./mysqld_exporter

* 우리 DB와 연결

vim /etc/mysql/my.cnf 에 아래코드 추가

[client] host= #ip address# port=3306 user= # id # assword= # pw # database= # database #

* 실행하기

cd mysqld_exporter

./mysqld_exporter

* url 접속

<img width="838" alt="스크린샷 2024-03-11 오후 4 50 55" src="https://github.com/jiminchur/Closet_Cody_recommendModel/assets/145955453/d78342aa-f3c8-4b28-be17-3e40d6cda026">
jiminchur commented 7 months ago

vim prometheus.yaml

아래코드 추가

jiminchur commented 7 months ago
스크린샷 2024-03-11 오후 5 51 40