버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.

...

참고) https://grafana.com/grafana/dashboards/

2. 쿠버네티스 로깅

2.1 Loki Stack

  • Grafana Labs에서 개발한 로그 집계 시스템으로, 프로메테우스와 유사한 메트릭 수집 모델을 사용합니다.

  • Loki는 메타데이터만 인덱싱하고 로그 데이터 자체는 압축된 청크로 저장하여 효율적이고 비용 효율적인 로그 관리 시스템을 제공합니다.

(1) Loki 구성요소

  • Loki

    • 로그 저장 및 검색을 담당하는 백엔드 시스템입니다.

    • 로그 데이터를 청크로 저장하고 메타데이터를 인덱싱합니다.

  • Promtail

    • 로그 수집 에이전트로, 로그 데이터를 수집하여 Loki로 전송합니다.

    • 쿠버네티스 환경에서는 노드에서 컨테이너 로그를 수집하고 레이블을 추가하여 Loki로 보냅니다.

  • Grafana

    • Loki 데이터를 시각화하고 쿼리하는 대시보드 도구입니다.

    • 메트릭과 로그 데이터를 통합하여 종합적인 모니터링 솔루션을 제공합니다.

...

kube-prometheus-stack 설치

코드 블럭
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update/helm-charts
helm repo update

코드 블럭
helm pull prometheus-community/kube-prometheus-stack --untar
# cd kube-prometheus-stack/

코드 블럭
helm install lokiprometheus-stack grafana/loki-stack . -f values.yaml -n monitoring --create-namespace logging --create-namespace

코드 블럭
kubectl -n monitoring edit svc prometheus-stack-grafana
ClusterIP -> LoadBalancer

image-20240521-015740.pngImage Added