반응형

모니터링/prometheus 19

[ Fargate ] Adot-collector 설치 (fargate 메트릭,로그)

개요EKS WokerNode를 EC2방식과 Fargate 방식으로 띄울 수 있습니다.Fargate 방식으로 WorkerNode를 띄울 경우 daemonset pod를 배포할 수 가 없습니다.daemonset pod를 배포하지 못하면 일어나는 일- prometheus에서 데이터 수집용인 node-exporter를 배포할 수 가 없습니다.- 로그 수집 fluent-bit를 배포할 수 가 없습니다.- 등AWS EKS의 Fargate에서 실행되는 어플리케이션의 경우 ADOT(AWS Distro for OpenTelemetry)으로 시스템 지표(메트릭), Log를 수집메트릭은 CloudWatch Container Insights에 저장되며, CloudWatch 컨테이너 인사이트 대시보드으로 확인 가능  OpenT..

[ Cloudwatch ] fluent-bit에서 CW으로 로그 적재

개요 kubernetes pod의 로그를 수집하기 위해서 fluent-bit을 사용할 수 있습니다. (그외 다른 것도 있습니다.) 로그 수집 흐름 example 1) fluent-bit -> Loki -> Grafana example 2) fluent-bit -> CloudWatch -> Grafana example 3) fluent-bit -> ElasticSearch -> Grafana > 로그 저장소를 원하는 것으로 선택하시면 됩니다. 참조 링크 1. fluent-bit 커스텀 설치 : https://dongwook35.tistory.com/93 2. AWS CloudWatch 로그 수집 공식 메뉴얼 : https://docs.aws.amazon.com/ko_kr/AmazonCloudWatch/la..

[ Fargate ] Fargate 로깅

개요 EKS WokerNode를 EC2방식과 Fargate 방식으로 띄울 수 있습니다. Fargate 방식으로 WorkerNode를 띄울 경우 daemonset pod를 배포할 수 가 없습니다. daemonset pod를 배포하지 못하면 일어나는 일 - prometheus에서 데이터 수집용인 node-exporter를 배포할 수 가 없습니다. - 로그 수집 fluent-bit를 배포할 수 가 없습니다. - 등 1. Fargate에서 로깅하는 방법 메뉴얼 : https://docs.aws.amazon.com/ko_kr/eks/latest/userguide/fargate-logging.html Fargate 용 fluent-bit 설치해서 로그를 수집할 수 있습니다. fluent-bit container를 ..

fluent-bit

kubernetes pod의 로그를 수집하기 위해서 Loki와 fluent-bit을 사용할 수 있습니다. (그외 다른 것도 있습니다.) fluent-bit -> Loki -> Grafana 1. fluent-bit 이란 ? fluent-bit은 로그 수집기(LogStash, fluentd 등) 입니다. fluent-bit 메뉴얼 : https://docs.fluentbit.io/manual/about/what-is-fluent-bit 2. Data pipeline data pipeline 링크 : https://docs.fluentbit.io/manual/concepts/data-pipeline/input Input plugin 링크 : https://docs.fluentbit.io/manual/pipe..

[ AMP ] Amazon Managed service for Prometheus 구축

개요 amp은 프로메테우스 모니터링 서비스입니다. 장점 - 프로메테우스 서버(pod)를 이중화 하지 않아도 됩니다. - 사용하는 만큼 비용을 지불하기 때문에 볼륨(PV, EFS) 설정을 하지 않아도됩니다. - pod를 관리할 필요없으며, 확장성, 가용성 및 보안을 누릴 수 있습니다. 단점 : - prometheus Dashboard가 없어서 사용하기 불편합니다. - awscurl으로 query URL으로 메트릭 정보 및 알람 정보를 봐야합니다. - AlertManager Dashboard가 없어서 사용하기 불편합니다. - Rule Management를 yaml형태로 업로드해서 사용해야합니다. - Alert Manager에 yaml형태로 업로드해서 사용해야합니다. - Alert은 SNS만 지원됩니다. - ..

[ prometheus ] scrape 설정

개요 prometheus server가 exporter 메트릭을 수집(scrape) 갑니다. exporter 메트릭을 수집(scrape)하기 위해서는 "ScrapeConfigs" 설정에서 job_name 별로 설정해야합니다. https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config 1. Scrape 옵션 설명 job_name : 수집한 데이터를 구분하기 위한 이름입니다. scrape_interval : 수집할 간격 metrics_path : URL Path static_configs : 지정한 Target IP만 데이터를 수집합니다. kubernetes_sd_configs : SD(Servic..

[ prometheus ] blackbox exporter

개요 BlackBox exporter를 이용하여 외부에 있는 엔드포인트 서비스를 모니터링 할 수 있습니다. HTTPS, HTTP, TCP, DNS, ICMP 등 외부 엔드포인트 probe(조사) 할 수 있습니다. 엔드포인트 모니터링은 HTTP 대기 시간 DNS 조회 대기 시간 SSL 인증서 만료 정보 TLS 버전 HTTP Version 접속 정보 (status 200, 4xx 등) 링크 https://github.com/prometheus/blackbox_exporter https://www.infracloud.io/blogs/monitoring-endpoints-kubernetes-blackbox-exporter/ 1. whitebox와 blackbox 모니터링 차이점 whitebox 모니터링 어플리케..

[OpenTelemetry] 설치

1. OpenTelemetry이란? OpenTelemetry Collector는 application이 보낸 데이터를 수집(receivers)하고 가공(processors)하여 저장소로 내보내는(exporters) 역할을 한다. Jaeger, Prometheus 등 다양한 오픈 소스의 메트릭을 수집하고 전달해주는 역할을 한다. CNCF(Cloud Native Computing Foundation) 프로제트 메뉴얼 링크 : https://opentelemetry.io/docs/what-is-opentelemetry/ 설치 메뉴얼 링크 : https://github.com/open-telemetry/opentelemetry-operator 2. Prometheus 메트릭 수집, 전달 사용 방법 exporte..

[ Loki ] 설치

프로메테우스는 메트릭 정보만 가져올 수 있다. kubernetes의 pod 로그를 가져오려면 로그 수집 Loki를 이용해야한다. 메뉴얼 https://grafana.com/docs/loki/latest/ https://github.com/grafana/lok 1. Loki 이란? Grafana Loki(그라파나 로키)는 분산 로그 수집 시스템으로, Prometheus와 함께 Grafana Labs에서 개발한 오픈소스 프로젝트입니다. Loki는 로그 데이터를 수집하고 색인화하여 검색 가능한 형식으로 저장하는 기능을 제공합니다. 이를 통해 대규모 분산 시스템에서 발생하는 로그 데이터를 보다 쉽게 관리하고 분석할 수 있습니다. Loki는 기존의 로그 수집 시스템과 달리, 로그 데이터를 중앙 집중화 하지 않고 ..

[ Prometheus ] Alert - Rule

Prometheus Chart 파일에서 알람 받을 규칙을 설정합니다. 알람 규칙을 Web Console에서 할 수 없습니다. [ 작업 순서 ] 1. Alert Rule 규칙 생성 2. Prometheus 재배포 3. Prometheus에서 Rule 설정 확인 4. Prometheus에서 Rule 감지 확인 5. Slack Alert 확인 Alert 가이드 https://godekdls.github.io/Prometheus/alerting.overview/ https://samber.github.io/awesome-prometheus-alerts/rules.html 1. 선행 작업 promethues에서 Alert이 발생하면 Slack으로 전달 받을 수 있도록 설정 Slack Alert 설정 방법 : h..

반응형