# PINPOINT 다운로드
[DOWNLOAD URL : https://github.com/naver/pinpoint/releases/tag/v2.0.3 ]
# Agent
Pinpoint]$ wget https://github.com/naver/pinpoint/releases/download/v2.0.3/pinpoint-agent-2.0.3.tar.gz
--2020-07-27 17:05:30-- https://github.com/naver/pinpoint/releases/download/v2.0.3/pinpoint-agent-2.0.3.tar.gz
Resolving github.com (github.com)... 15.164.81.167
Connecting to github.com (github.com)|15.164.81.167|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/25459400/c7d2f900-b20e-11ea-9525-8e9234d1e963?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200727T080531Z&X-Amz-Expires=300&X-Amz-Signature=029c7b40e1e04a732bf1a044be7baae8e833dea9bca6885da54dbbf3fc1216bd&X-Amz-SignedHeaders=host&actor_id=0&repo_id=25459400&response-content-disposition=attachment%3B%20filename%3Dpinpoint-agent-2.0.3.tar.gz&response-content-type=application%2Foctet-stream [following]
--2020-07-27 17:05:31-- https://github-production-release-asset-2e65be.s3.amazonaws.com/25459400/c7d2f900-b20e-11ea-9525-8e9234d1e963?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200727T080531Z&X-Amz-Expires=300&X-Amz-Signature=029c7b40e1e04a732bf1a044be7baae8e833dea9bca6885da54dbbf3fc1216bd&X-Amz-SignedHeaders=host&actor_id=0&repo_id=25459400&response-content-disposition=attachment%3B%20filename%3Dpinpoint-agent-2.0.3.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.85.67
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.85.67|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19247278 (18M) [application/octet-stream]
Saving to: ‘pinpoint-agent-2.0.3.tar.gz’
pinpoint-agent-2.0.3.tar.gz 100%[=====================================>] 18.36M 2.97MB/s in 7.2s
2020-07-27 17:05:39 (2.55 MB/s) - ‘pinpoint-agent-2.0.3.tar.gz’ saved [19247278/19247278]
# Collector
Pinpoint]$ wget https://github.com/naver/pinpoint/releases/download/v2.0.3/pinpoint-collector-2.0.3.war
--2020-07-27 17:07:14-- https://github.com/naver/pinpoint/releases/download/v2.0.3/pinpoint-collector-2.0.3.war
Resolving github.com (github.com)... 15.164.81.167
Connecting to github.com (github.com)|15.164.81.167|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/25459400/ca355300-b20e-11ea-9982-6d50b8c1c238?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200727T080714Z&X-Amz-Expires=300&X-Amz-Signature=39750cab3dc4b19cfb3fa7748de7d7c3ac1c1db02e1fee30a65ee0e4abecb532&X-Amz-SignedHeaders=host&actor_id=0&repo_id=25459400&response-content-disposition=attachment%3B%20filename%3Dpinpoint-collector-2.0.3.war&response-content-type=application%2Foctet-stream [following]
--2020-07-27 17:07:14-- https://github-production-release-asset-2e65be.s3.amazonaws.com/25459400/ca355300-b20e-11ea-9982-6d50b8c1c238?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200727T080714Z&X-Amz-Expires=300&X-Amz-Signature=39750cab3dc4b19cfb3fa7748de7d7c3ac1c1db02e1fee30a65ee0e4abecb532&X-Amz-SignedHeaders=host&actor_id=0&repo_id=25459400&response-content-disposition=attachment%3B%20filename%3Dpinpoint-collector-2.0.3.war&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.217.8.60
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.217.8.60|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 59177691 (56M) [application/octet-stream]
Saving to: ‘pinpoint-collector-2.0.3.war’
pinpoint-collector-2.0.3.war 100%[===============================>] 56.44M 4.57MB/s in 18s
2020-07-27 17:07:33 (3.19 MB/s) - ‘pinpoint-collector-2.0.3.war’ saved [59177691/59177691]
# Web
Pinpoint]$ wget https://github.com/naver/pinpoint/releases/download/v2.0.3/pinpoint-web-2.0.3.war
--2020-07-27 17:08:29-- https://github.com/naver/pinpoint/releases/download/v2.0.3/pinpoint-web-2.0.3.war
Resolving github.com (github.com)... 52.78.231.108
Connecting to github.com (github.com)|52.78.231.108|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/25459400/d4efe800-b20e-11ea-85f4-3e9b2bbc72c5?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200727T080829Z&X-Amz-Expires=300&X-Amz-Signature=5eea028a7f27c35d77344e8025bc302c3f96a6b7ca94ac4cb6e1ce998c61567f&X-Amz-SignedHeaders=host&actor_id=0&repo_id=25459400&response-content-disposition=attachment%3B%20filename%3Dpinpoint-web-2.0.3.war&response-content-type=application%2Foctet-stream [following]
--2020-07-27 17:08:29-- https://github-production-release-asset-2e65be.s3.amazonaws.com/25459400/d4efe800-b20e-11ea-85f4-3e9b2bbc72c5?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200727T080829Z&X-Amz-Expires=300&X-Amz-Signature=5eea028a7f27c35d77344e8025bc302c3f96a6b7ca94ac4cb6e1ce998c61567f&X-Amz-SignedHeaders=host&actor_id=0&repo_id=25459400&response-content-disposition=attachment%3B%20filename%3Dpinpoint-web-2.0.3.war&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.164.43
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.164.43|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 79603494 (76M) [application/octet-stream]
Saving to: ‘pinpoint-web-2.0.3.war’
pinpoint-web-2.0.3.war 100%[===========================================>] 75.92M 7.00MB/s in 21s
2020-07-27 17:08:51 (3.61 MB/s) - ‘pinpoint-web-2.0.3.war’ saved [79603494/79603494]
- Web 설치
Tomcat > webapps > ROOT 폴더 삭제
Pinpoint]$ rm -R ./apache-tomcat-9.0.37/webapps/ROOT
ROOT 폴더를 생성 후 다운받은 pinpoint-web-2.0.3.war 을 복사한다
mkdir ./apache-tomcat-9.0.37/webapps/ROOT
cp ./pinpoint-web-2.0.3.war ./apache-tomcat-9.0.37/webapps/ROOT/pinpoint-web-2.0.3.war
복사 완료 후 압축 해지한다
# 폴더 이동
cd ./apache-tomcat-9.0.37/webapps/ROOT
# 압축해제
jar xvf pinpoint-web-2.0.3.war
# pinpoint-web-2.0.3.war 삭제
rm ./pinpoint-web-2.0.3.war
아래에 3개의 파일을 vi 로 보면
/apache-tomcat-9.0.37/webapps/ROOT/WEB-INF/classes/hbase.properties
/apache-tomcat-9.0.37/webapps/ROOT/WEB-INF/classes/profiles/local/hbase-env.properties
/apache-tomcat-9.0.37/webapps/ROOT/WEB-INF/classes/profiles/release/hbase-env.properties
hbase.client.host=${pinpoint.zookeeper.address} 값이 있다.
hbase IP값을 입력하는 부분인데, localhost로 변경해 주면 된다.
수정없이 한번에 적용을 하려면 톰캣구동시에 옵션으로 넣어주어도 된다.
vi /apache-tomcat-9.0.37/bin/catalina.sh
# catalina.sh 에 추가
export JAVA_OPTS="-Dpinpoint.zookeeper.address=localhost"
톰캣을 실행해보자
Pinpoint]$ ./apache-tomcat-9.0.37/bin/startup.sh
PINPOINT WEB 화면을 확인 할 수 있다.
- Collector 설치
톰캣이 구동중이라면 Shutdown을 시킨다
Pinpoint]$ ./apache-tomcat-9.0.37/bin/shutdown.sh
폴더를 생성 후 다운받은pinpoint-collector-2.0.3.war 을 복사한다
mkdir ./apache-tomcat-9.0.37/webapps/pinpoint-collector-2.0.3
cp ./pinpoint-collector-2.0.3.war ./apache-tomcat-9.0.37/webapps/pinpoint-collector-2.0.3/pinpoint-collector-2.0.3.war
복사 완료 후 압축 해지한다
# 폴더 이동
cd ./apache-tomcat-9.0.37/webapps/pinpoint-collector-2.0.3
# 압축해제
jar xvf pinpoint-collector-2.0.3.war
# pinpoint-collector-2.0.3.war 삭제
rm ./pinpoint-collector-2.0.3.war
아래에 3개의 파일을 vi 로 보면
/apache-tomcat-9.0.37/webapps/pinpoint-collector-2.0.3/WEB-INF/classes/hbase.properties
/apache-tomcat-9.0.37/webapps/pinpoint-collector-2.0.3/WEB-INF/classes/profiles/local/hbase-env.properties
/apache-tomcat-9.0.37/webapps/pinpoint-collector-2.0.3/WEB-INF/classes/profiles/release/hbase-env.properties
hbase.client.host=${pinpoint.zookeeper.address} 값이 있다.
hbase IP값을 입력하는 부분인데, localhost로 변경해 주면 된다.
위에 Web 설치 과정에서 Tomcat catalina.sh 에 자바 옵션을 주었다면, 다른 수정은 안해도 된다.
# 아래 3개의 파일 설정
/apache-tomcat-9.0.37/webapps/pinpoint-collector-2.0.3/WEB-INF/classes/pinpoint-collector.properties
/apache-tomcat-9.0.37/webapps/pinpoint-collector-2.0.3/WEB-INF/classes/profiles/local/pinpoint-collector-grpc-env.properties
/apache-tomcat-9.0.37/webapps/pinpoint-collector-2.0.3/WEB-INF/classes/profiles/release/pinpoint-collector-grpc-env.properties
# 필요시 아래 정보 수정
collector.receiver.base.ip=0.0.0.0
collector.receiver.base.port=9994
collector.receiver.stat.udp.ip=0.0.0.0
collector.receiver.stat.udp.port=9995
collector.receiver.stat.tcp.ip=0.0.0.0
collector.receiver.stat.tcp.port=9995
- Agent 설치
샘플로 톰캣이 구동되는 있는 시스템에 적용하도록 하겠다.
Agent 파일을 구동 되고 있는 SpringBoot 또는 Tomcat 서버쪽에 파일을 복사를 한다.
Pinpoint Agent 복사가 완료 되면 압축을 해지한다
# 압축해제
tar -zxvf pinpoint-agent-2.0.3.tar.gz
# 아래 3개의 파일 설정
/pinpoint/pinpoint-agent-2.0.3/pinpoint.config
/pinpoint/pinpoint-agent-2.0.3/profiles/local/pinpoint-env.config
/pinpoint/pinpoint-agent-2.0.3/profiles/release/pinpoint-env.config
# ip정보를 collector 서버쪽 아이피 주소로 변경한다
###########################################################
# gRPC Configuration #
###########################################################
profiler.transport.grpc.collector.ip=127.0.0.1
###########################################################
# Thrift Configuration #
###########################################################
profiler.collector.ip=127.0.0.1
그리고
Tomacat bin/catalina.sh에 아래와 같은 옵션값을 추가한다.
# PINPOINT AGENT 경로
CATALINA_OPTS="$CATALINA_OPTS -javaagent:/pinpoint/pinpoint-agent-2.0.3/pinpoint-bootstrap-2.0.3.jar"
# 고유 ID
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.agentId=CMS_TEST"
# 그룹 ID
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.applicationName=CMS_DEV"
마지막으로 톰캣을 재시작 해주면 된다.
Agent까지 완료 후 브라우저에서 Pinpoint Web에 접근 하면 아래와 같은 화면을 확인할 수 있다.
참고 정보 : https://yamoe.tistory.com/544
참고 정보 : https://github.com/naver/pinpoint/tree/master/hbase/scripts
'개발경험 및 메모 > Pinpoint' 카테고리의 다른 글
PINPOINT 2.0.3 Alarm Mail (0) | 2020.08.03 |
---|---|
PINPOINT 2.0.3 quickstart 설치 (0) | 2020.07.30 |
PINPOINT 2.0.3 설치준비 - HBASE, TOMCAT (3) | 2020.07.27 |
PINPOINT 란? (0) | 2020.07.27 |
최근댓글