반응형

모니터링/prometheus 19

[ Prometheus ] AlertManager - Slack 설정

개요 Prometheus Alertmanager는 Prometheus 모니터링 시스템의 알림 관리 도구입니다. Prometheus는 감시 대상을 주기적으로 폴링하고 지표를 수집하여 저장합니다. 이러한 지표를 분석하고 규칙을 정의하여 문제가 발생하면 이를 감지하고 알림을 발생시킵니다. 이때 Alertmanager는 Prometheus가 생성한 알림을 처리하고 관리하는 역할을 합니다. Alertmanager는 알림을 필터링하고 그룹화하여 수신 대상을 선택하고 다양한 방법으로 알림을 전송할 수 있습니다. 또한 Alertmanager는 중복 알림을 방지하고 알림 상태를 추적하여 중복 알림을 생성하지 않도록 보장합니다. 따라서 Alertmanager는 Prometheus 모니터링 시스템의 중요한 구성 요소 중 하..

[ Prometheus ] Nginx Log exporter

개요 nginx log exporter는 nginx log metrics 정보를 수집해주는 역할을 합니다. nginx log exporter 메뉴얼 : https://github.com/martin-helmich/prometheus-nginxlog-exporter Nginx 설정 1. nginx log 설정 nginx 엑세스 로그 포맷에서는 “request_time” 옵션이 빠져있다. “request_time” metrics 수집을 위해서 설정해준다. log_format를 아래와 같이 수정해준다. sudo vi /etc/nginx/nginx.conf ... 중간 생략 ... http { log_format main '$remote_addr - $remote_user [$time_local] ' '"$re..

[ prometheus ] Nginx exporter

개요 nginx exporter는 nginx metrics 정보를 수집해주는 역할을 합니다. Nginx exporter 메뉴얼 : https://github.com/nginxinc/nginx-prometheus-exporter Nginx 설정 1. 모듈 확인 nginx 관련 metrics를 수집하기 위해서는 “ngx_http_stub_status_module” Enable 설정이 필요합니다. ngx_http_stub_status_module Enable 설정 확인 nginx -V 2>&1 | grep -o with-http_stub_status_module with-http-_stub_status_module 2. nginx 설정 metrics 접근 가능한 경로 설정 http dirctive내에 serv..

[ Grafana ] Alert - Slack

1. Slack “NEW APP” 생성 apps 슬랙 페이지 접속 : https://api.slack.com/apps “Create New App” 클릭 App Name 입력 Workspace 선택 “Create App” 클릭 Install your app 설치 Features → “Oauth & Permissions” 클릭 “OAuth Tokens for Your Wokrspace” 토큰 확인 ex) xoxb-xxxxxxxx Features → “Oauth & Permissions” 클릭 Scopes 설정 chat:write files:write 2. Slack Bot 추가 생성한 앱 이름을 입력하면 앱을 초대할 수 있다. “@grafana-Alert” 입력 3. Slack Bot 테스트 테스트 사이트..

[ Grafana ] 설정

개요 Grafana는 데이터 시각화 및 모니터링 도구입니다. Grafana를 사용하면 다양한 데이터 소스에서 데이터를 검색하고 시각화할 수 있습니다. 예를 들어, 서버의 성능 지표, 인터넷 응용 프로그램의 웹 트래픽, 온라인 서비스의 사용자 상호작용과 같은 데이터를 시각화 할 수 있습니다. Grafana는 다양한 데이터 소스에 대한 지원을 제공하며, Prometheus, Graphite, Elasticsearch, InfluxDB 등 다양한 오픈 소스 및 상용 소프트웨어를 지원합니다. Grafana는 대시 보드 및 경고 기능을 포함하여 다양한 기능을 제공합니다. 1. data source 가져오기 Configuration → “Data sources” → “Add data source” 클릭 Promet..

[ prometheus ] node exporter

node exporter 이란? 서버에 Node exporter를 설치하고 프로메테우스 서버가 데이터를 수집해간다. 1. EC2에 node-exporter 설치 # node-exporter 다운로드 wget https://github.com/prometheus/node_exporter/releases/download/v0.17.0/node_exporter-0.17.0.linux-amd64.tar.gz # node-exporter 설정 tar xvfz node_exporter-0.17.0.linux-amd64.tar.gz sudo cp node_exporter-1.3.1.linux-arm64/node_exporter /usr/local/bin/ sudo useradd -M -r -s /bin/false n..

[ prometheus ] component 구성

프로메테우스 구성 가이드 : https://prometheus.io/docs/prometheus/latest/configuration/configuration/#static_config 프로메테우스 구성도 1. Prometheus Component Prometheues Operator Prometheus Server와 Alertmanager 등을 관리 Prometheues Server ServiceMonitor 정의된 Target 메트릭 정보를 수집 ServiceMonitor, PodMonitor가 있다. AlertManager가 설정된 내용으로 Alert 전송 Prometheues metrics kubernetes metrics-server의 메트릭 정보를 수집 Prometheues node expor..

[ prometheus ] 설치

개요 Prometheus은 EKS Infra 메트릭 수집 모니터링 툴이다. Grafana은 수집한 메트릭 지표를 그래프화해주는 툴이다. prometheus은 쿠버네티스에서 가장 많이 사용하는 오픈소스 모니터링 툴이다. CNCF 제단이며, kubernetes, docker 컨테이너를 모니터링에 특화되어있다. 설치 메뉴얼 : https://github.com/prometheus-operator/kube-prometheus 1. 프로메테우스 설치 - Source 파일 : https://github.com/tingtomkim/devops/tree/main/monitoring/prometheus mkdir prometheus cd prometheus helm repo add prometheus-community ..

반응형