From 93803da56f363f474b064bbec52c86874012daad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Wed, 25 Feb 2026 00:51:29 +0900 Subject: [PATCH] =?UTF-8?q?docs:=EB=AA=A8=EB=8B=88=ED=84=B0=EB=A7=81=20?= =?UTF-8?q?=EB=AC=B8=EC=84=9C=EC=97=90=20=EA=B0=9C=EB=B0=9C=EC=84=9C?= =?UTF-8?q?=EB=B2=84(sam-dev)=20=EC=B6=94=EA=B0=80=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 아키텍처 다이어그램에 개발서버 라인 추가 - Prometheus 스크래핑 설정에 sam-dev job 반영 - 스크래핑 대상 추가 가이드에 node_exporter 설치, 방화벽 허용 절차 보강 Co-Authored-By: Claude Opus 4.6 --- deploys/ops-manual/07-monitoring.md | 30 ++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/deploys/ops-manual/07-monitoring.md b/deploys/ops-manual/07-monitoring.md index 8a01bea..d68182c 100644 --- a/deploys/ops-manual/07-monitoring.md +++ b/deploys/ops-manual/07-monitoring.md @@ -8,12 +8,14 @@ ``` 운영서버 (node_exporter:9100) --스크래핑--> CI/CD (Prometheus:9090) --> Grafana:3100 +개발서버 (node_exporter:9100) --스크래핑--> CI/CD (Prometheus:9090) --> Grafana:3100 CI/CD (node_exporter:9100) --스크래핑--> CI/CD (Prometheus:9090) --> Grafana:3100 ``` - **Grafana 대시보드:** https://monitor.sam.it.kr - **Prometheus 쿼리:** CI/CD 서버에서 http://localhost:9090 - **운영서버 메트릭:** 운영서버에서 http://localhost:9100/metrics +- **개발서버 메트릭:** 개발서버에서 http://localhost:9100/metrics --- @@ -38,25 +40,39 @@ scrape_configs: - targets: ['localhost:9100'] labels: server: 'cicd' + + - job_name: 'sam-dev' + static_configs: + - targets: ['114.203.209.83:9100'] + labels: + server: 'development' ``` ### 스크래핑 대상 추가 ```bash -# 1. 설정 파일 편집 +# 1. 대상 서버에 node_exporter 설치 (미설치 시) +# 바이너리: https://github.com/prometheus/node_exporter/releases +# 서비스: /etc/systemd/system/node_exporter.service +# 포트: 9100 (기본) + +# 2. 대상 서버 방화벽에서 CI/CD IP 허용 +sudo ufw allow from 110.10.147.46 to any port 9100 comment 'Prometheus scraping from CI/CD' + +# 3. CI/CD 서버에서 설정 파일 편집 sudo vim /etc/prometheus/prometheus.yml -# 2. 새 대상 추가 예시 -# - job_name: 'sam-dev' +# 4. 새 대상 추가 예시 +# - job_name: 'sam-new' # static_configs: -# - targets: ['114.203.209.83:9100'] +# - targets: ['<서버IP>:9100'] # labels: -# server: 'development' +# server: '<환경명>' -# 3. 문법 검사 +# 5. 문법 검사 promtool check config /etc/prometheus/prometheus.yml -# 4. 서비스 리로드 +# 6. 서비스 리로드 sudo systemctl restart prometheus ```