monitoring 3

Telegraf 를 활용한 Prometheus exporter metric 수집 및 DB 적재

Telegraf를 활용한 Prometheus exporter metric 수집 및 DB 적재filestats exporter(프로메테우스 익스포터)에서 수집할 수 있는 Data를 Prometheus 가 아닌 DB에 저장할 방법을 찾아본다.0. Telegraf 소개Telegraf는 데이터베이스, 시스템 및 IoT 센서에서 메트릭 및 이벤트를 수집하고 전송하기 위한 플러그인 중심 서버 에이전트입니다. Telegraf는 Go로 작성되었으며 외부 종속성 없이 단일 바이너리로 컴파일되며 최소한의 메모리 공간만 필요합니다. -와탭 telegraf 소개(https://docs.whatap.io/telegraf/introduction)아키텍쳐Input(Source): 정보를 가져올 곳주요 input plugin: ht..

[Loki, K8s] 원인 불명의 Loki - CrashLoopBackOff 문제 해결 (EBS 용량 )

개요3개월 이상 안정적으로 작동하던 Loki pod가 알 수 없는 이유로 CrashLoopBackOff 상태가 됨.수동으로 Pod 삭제, Service enable / disable 등 처리를 했음에도 CrashLoopBackOff 상태에서 벗어나지 못함.에러 문구 확인 결과 loki init 단계에서 실패하는 것으로 판단됨.원인loki에 할당된 PV 가 모두 사용됨.구체적인 원인Kuberenetes Event exporter 설치 후 정상적인 dashboard 작동 위해 loki의 버전을 높임.Loki의 버전업 (2.6.1 -> 2.9.6)에 따라 log retention 의 default 값이 off로 바뀜.구동 이후 약 2개월간의 로그가 누적 저장됨.정기적으로 쿼리가 retention 되지 않아 E..

[Prometheus] 적절한 scrape_interval을 찾아.. - Node exporter 코드 분석

목차Prometheus의 대략적인 구조 - pulling, exporter결론분석1. Prometheus의 구조 - exporter, pullingPrometheus 각종 exporter 들로부터 그들의 매트릭을 pull하여 저장한다. 그 주기는 scrape_config - rate_interval(이하 scrape interval) 을 참조한다. docker에 node-exporter, cadvisor-exporter 등의 이름으로 container 를 돌리고 있다면, 아래처럼 접속해서 prometheus 가 수집하는 매트릭을 확인해볼 수 있다.  http://node-exporter:9100/metrichttp://cadvisor-exporter:9100/metric그렇다면 이들 exporter들의 ..