Prometheus: Node Exporter 설치가이드
·
🖥️Monitoring/Prometheus
node exporter 설치wget https://github.com/prometheus/node_exporter/releases/download/v1.7.0/node_exporter-1.7.0.linux-amd64.tar.gz파일 압축 풀기tar xzvf node_exporter-1.7.0.linux-amd64.tar.gzNode exporter 실행node_exporter를 이용해서 서버의 리소스를 메트릭으로 전달한다. 서버 모니터링을 할 서버에 설치해야 한다.설치하는 서버 방화벽 9100 해제해야 한다../node_exporter./node_exporter & # 백그라운드 실행.Prometheus — node_exporter 사이에 metric 전송 방식은 prometheus가 node_expo..
Prometheus: Alertmanager Curl로 Silence 요청하는 법
·
🖥️Monitoring/Prometheus
해당 기능: Jenkins 사용해서 shell schedule로 돌림.먼저, 프로메테우스 — alertmanager 서버 방화벽이 뚫려 있어야 함.curl -XPOST -H "Content-Type: application/json" \ -d '{ "matchers": [ { "name": "instance", "value": "서버_IP:9100", "isRegex": false }, { "name": "job", "value": "서버JOB이름", "isRegex": false } ], ..
Prometheus: 설치가이드
·
🖥️Monitoring/Prometheus
prometheus 설치Prometheus wget으로 설치wget https://github.com/prometheus/prometheus/releases/download/v2.42.0/prometheus-2.42.0.linux-amd64.tar.gzPrometheus 압축풀기tar -xzvf prometheus-2.42.0.linux-amd64.tar.gzprometheus 실행./prometheus--config.file=/파일경로/prometheus.ymlPrometheus 접속하는 법프로메테우스 default 포트 : 9090http://localhost:9090접속이 된다면, 정상.prometheus.yml 파일설정# my global configglobal: scrape_interval: ..
Prometheus: Blackbox Exporter 사용기
·
🖥️Monitoring/Prometheus
Prometheus Blackbox Exporter 사용기사용목적 : process — UP,DOWN 체크리눅스 서버 안에 Process UP, DOWN 체크를 하기 위해 사용하였다.wget https://github.com/prometheus/blackbox_exporter/releases/download/v0.25.0/blackbox_exporter-0.25.0.linux-amd64.tar.gz감시할 Process가 있는 서버에 blackbox exporter를 설치tar -xzvf blackbox_exporter-0.25.0.linux-amd64.tar.gz압축을 풀고, 폴더 안에 blackbox.yml 파일 열기vi blackbox.ymlmodules: http_2xx: prober: ht..
Prometheus: alertmanager 오류 대처법
·
🖥️Monitoring/Prometheus
level=warn component=cluster err="couldn't deduce an advertise address: no private IP found, explicit advertise addr not provided"ts=2024-06-05T03:36:10.082Z caller=main.go:278 level=error msg="unable to initialize gossip mesh" err="create memberlist: Failed to get final advertise address: No private IP address found, and explicit IP not provided"해당 오류는 클러스터 모드에서 사용할 광고 주소(advertise address)를 설정..
Prometheus: Python HTTP 서버와 프로세스 체크
·
🖥️Monitoring/Prometheus
먼저, http 서버를 돌려야 하기 때문에 python3 설치 여부 확인which python3내가 체크하고자 하는 프로세스가 돌고 있는지 체크하는 sh 파일# cd /usr/local/bin 에### crawler_check.sh#!/bin/bash# 체크할 프로세스의 경로를 변수에 저장합니다.PROCESS_PATH="./venv/bin/python tool/checkup_crawler.py --prod -d"# 프로세스가 실행 중인지 확인합니다.if pgrep -f "$PROCESS_PATH" > /dev/nullthen PROCESS_STATUS=1 # 프로세스가 실행 중이면 1else PROCESS_STATUS=0 # 프로세스가 실행 중이지 않으면 0fi# Prometheus 메트릭..