본문 바로가기

Monitoring Tools/Pinpoint

(19)
18. Real Remote Address (reverse proxy 사용) 1. nginx(reverse proxy) → Tomcat 으로 사용 중일때 아래 그림과 같이 remote address가 localhost나 proxy IP로 찍힌다. 2. reverse proxy에서 X-Forwarded-For 헤더 변수에 remote address를 tomcat에 넘기면 pinpoint agent가 캐치 할수 있다. # Nginx config proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; ## pinpoint.config profiler.tomcat.realipheader=X..
17. pinpoint | Nginx Http Header 추가 1. Nginx → Tomcat 으로 보낼때 pinpoint가 해석 가능한 헤더에 시간값을 넣어줌으로서 Delay 계산 가능 2. tomcat pinpoint agent에 아래 내용 적용(default로 enable) ##pinpoint.config profiler.proxy.http.header.enable=true 3. Nginx 적용 server { server_name {domain}; location / { proxy_buffering on; proxy_buffer_size 128k; proxy_buffers 8 128k; access_log /var/log/nginx/access.log main2; ## pinpoint-monitor set $pinpoint_proxy_header "t=$ms..
16. pinpoint | [오류수정] API-METADATA-NOT-FOUND 1. 증상 : call tree - method 에 아래 그림과 같이 "API-METADATA-NOT-DOUND" 출력으로 추적불가 2. 확인 : hbase → ApiMetaData 테이블을 조회하면 실제 기록된 agent별 metadata를 볼수 있음 ## hbase_home/bin 에 hbase shell을 실행하여 접속 한다. [root@PINPOINT bin]# ./hbase shell 2020-07-15 14:28:50,761 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable HBase Shell; en..
pinpoint | 15. Alarm -> Slack Push 설정 1. pinpoint에서 slack webhook api등을 제공하지 않으며 기본적인 Email 을 이용하여 작업 2. 구조 : Pinpoint Email → Smtp Server:1025 → Slack Push 3. Email 설정 ## Email 설정 1025포트는 smtp 서버용 python 데몬 사용 예정 [root@PINPOINT sites]# cd /usr/local/pinpoint/tomcat9/webapps/ROOT/WEB-INF/classes [root@PINPOINT classes]# vim batch.properties #batch enable config batch.enable=true #batch server ip to execute batch batch.server.ip={pin..
pinpoint | 14. 로그인 페이지 생성 1. pinpoint에서 제공하는 계정 관리를 비롯한 로그인페이지가 없음. 2. 내부에서 사용할 목적으로 OPENLDAP, 이나 간단한 basic auth를 이용하여 로그인 페이지 생성 3. basic auth : Base64 방식으로 간단히 사용자를 관리 할 수 있지만 세션이나 타임아웃등의 세부 설정이 불가 ## nginx config location / { # auth_request /auth-proxy; #if ($remote_addr ~ 211.37.97.225){return 500; break;} auth_basic "Pinpoint"; auth_basic_user_file /usr/local/nginx/conf/sites/.htpasswd; proxy_http_version 1.1; proxy..
13.[기타] WEB - API ERROR Check http://{pinpoint_ip}/error
pinpoint | 12. WEB - Alarm 설정 ## mail smtp 정보 수정 [root@localhost classes]# pwd /usr/local/pinpoint/tomcat9/webapps/ROOT/WEB-INF/classes [root@localhost classes]# vim batch.properties #batch enable config batch.enable=true #batch server ip to execute batch #pinpoint web서버가 2대 이상일 경우에 동일한 batch가 여러대의 서버에서 동시에 실행되는것을 방지하기 위한 기능이다. batch.properties 파일에 설정한 ip의 값과 #pinpoint-web 서버의 ip가 일치할 경우에만 batch가 동작이 된다. (127.0.0.1을 설정한 경우 모..
pinpoint | 11. WEB - User Group 기능 추가 ## Alarm 설정에 필요한 usergroup 은 초기 설치시 지원되지 않으며 추가 설치 및 설정이 필요. ## User Group은 pinpoint web login 권한 구성을 위한 user생성 등의 행위와는 상관이 없음. ## pinpoint에서는 기본적으로 웹 로그인을 위한 권한 구성을 제공하지 않으며 가이드 또한 제공하지 않음. ## 다음과 같은 에러가 발생 2020-06-18 14:50:57 [ERROR](c.n.p.w.c.UserGroupController ) Exception occurred while trying to CRUD userGroup information org.springframework.transaction.CannotCreateTransactionException: Co..
10. [오류 수정] hbase Session expire로 shutdown 되는 현상 [root@localhost logs]# pwd /usr/local/pinpoint/hbase/hbase-1.2.7/logs [root@localhost logs]# vim hbase-root-master-localhost.localdomain.log 2020-06-18 13:53:27,110 WARN [localhost:42126.activeMasterManager-EventThread] client.ConnectionManager$HConnectionImplementation: This client just lost it's session with ZooKeeper, closing it. It will be recreated next time someone needs it org.apache.zook..
pinpoint | 9. [오류 수정] WEB - Agent Management - Agent 삭제시 ## 다음과 같은 오류 발생시 Http failure response for http://192.168.6.131:8080/admin/removeAgentId.pinpoint?applicationName=pinpoint-host&agentId=pinpoint: 400 OK http://192.168.6.131:8080/admin/removeAgentId.pinpoint?applicationName=pinpoint-host&agentId=pinpoint&password=$PASSWORD ## 위와 같이 applicationName, agentid, PASSWORD, 수정후 실행 하거나 아래와 같이 수정후 톰캣 재시작 [root@CC-MON-PINPOINT classes]# pwd /usr/local/pin..