본문으로 건너뛰기
50% 할인 모든 플랜, 기간 한정. 시작 가격 $2.48/mo
Prometheus

Prometheus

Prometheus는 시계열 모니터링의 표준입니다. Pull 방식 메트릭, PromQL 쿼리, 알림 규칙, Kubernetes 네이티브 디스커버리를 지원합니다. CNCF 졸업 프로젝트로, SoundCloud(최초 개발처)와 DigitalOcean, 그리고 전체 Kubernetes 배포 환경의 80%에서 사용됩니다.

한눈에 보기

64.7k

GitHub 스타

32

페이지 조회수

라이선스 Apache-2.0 버전 3.13.2 OS Ubuntu Server 24.04 LTS Min RAM 1 GB IP IPV4,IPV6

접속

  • 열기 https://<SERVER_IP>:9090 브라우저에서.
  • 인증서가 자체 서명되어 있으므로 브라우저에 인증서 경고가 표시됩니다.
  • Prometheus 타겟 페이지는 다음 주소에서 확인할 수 있습니다: https://<SERVER_IP>:9090/targets.
  • 메트릭은 다음 주소에서 확인할 수 있습니다: https://<SERVER_IP>:9090/metrics.

로그인

Prometheus는 HTTP Basic 인증으로 보호됩니다.

  • 사용자 이름: admin
  • 비밀번호: 저장된 위치 /root/.prometheus-credentials

동일한 인증이 웹 UI, API 및 다음 엔드포인트를 보호합니다: /metrics .

중요한 파일 및 디렉토리

  • Prometheus 설정: /etc/prometheus/prometheus.yml
  • 웹/TLS/인증 설정: /etc/prometheus/web-config.yml
  • TLS 인증서: /etc/prometheus/tls/
  • Prometheus 데이터: /var/lib/prometheus
  • Node Exporter Textfile Collector: /var/lib/node_exporter/textfile_collector
  • 자격 증명: /root/.prometheus-credentials
  • Prometheus 바이너리: /usr/local/bin/prometheus
  • Promtool: /usr/local/bin/promtool
  • Node Exporter 바이너리: /usr/local/bin/node_exporter
  • Prometheus 서비스: /etc/systemd/system/prometheus.service
  • Node Exporter 서비스: /etc/systemd/system/node_exporter.service

서비스 관리

Prometheus 확인:

systemctl status prometheus

Prometheus 재시작:

systemctl restart prometheus

Prometheus 로그 보기:

journalctl -u prometheus -f

Node Exporter 확인:

systemctl status node_exporter

Node Exporter 재시작:

systemctl restart node_exporter

Node Exporter 로그 보기:

journalctl -u node_exporter -f

타겟 추가

편집 /etc/prometheus/prometheus.yml:

vim /etc/prometheus/prometheus.yml

구성을 검증하세요:

promtool check config /etc/prometheus/prometheus.yml

Prometheus 리로드:

curl -sS --cacert /etc/prometheus/tls/prometheus.crt \
  -u admin:<PASSWORD> \
  -X POST https://localhost:9090/-/reload

보관 기간

Prometheus는 다음과 같이 구성되어 있습니다:

  • 보존 기간: 30d
  • 최대 저장 용량: 10GB

먼저 도달하는 제한이 적용됩니다.

참고

  • Grafana와 Alertmanager는 설치되어 있지 않습니다. 별도로 추가하여 이 Prometheus 인스턴스에 연결할 수 있습니다.
  • 메트릭은 최대 30일 또는 10 GB까지 보존되며, 먼저 도달하는 제한이 적용됩니다.
  • 사용자 지정 호스트 메트릭은 .prom 파일로 다음 위치에 추가할 수 있습니다: /var/lib/node_exporter/textfile_collector

모니터링의 더 보기

관련 앱.

지금 Prometheus를 배포하세요. 월 $2.48부터.