좋은 프로그램은 마음의 여유에서 나온다.

오픈소스 APM 핀포인트 설치 - quickstart 본문

기타

오픈소스 APM 핀포인트 설치 - quickstart

좋은데이 2015.04.22 17:44

네이버에서 오픈소스로 공개한 APM(Application Performance Management) : pinpoint


인프라 : AWS EC2 c3.2xlarge, Ubuntu 14.04 (pv)


1. 핀포인트 요구사항


JDK 6 설치

java.sun.com에서 JDK6 bin 다운로드


$ chmod +x jdk-6*

$ ./jdk-6*

$ ls -ahl

jdk1.6.0_45 디렉토리 확인


JAVA_6_HOME 환경변수 설정(핀포인트)

$ vi ~/.profile


export JAVA_7_HOME=/home/ubuntu/jdk1.6.0_45


$ source ~/.profile


JDK 7 설치

java.sun.com에서 JDK7 bin 다운로드


압축 해제

$ tar -zxvf jdk-7*


JAVA_HOME 환경변수 설정(핀포인트 : JAVA_7_HOME)

$ vi ~/.profile


export JAVA_HOME=/home/ubuntu/jdk1.7.0_76

export JAVA_7_HOME=/home/ubuntu/jdk1.7.0_76

PATH=$PATH:$JAVA_HOME/bin


$ source ~/.profile

$ java -version

java version "1.7.0_76"


Maven 3.2.x 설치

tar.gz 다운로드 (http://maven.apache.org/download.cgi)


압축 해제

$ tar -zxvf apache-maven-*


메이븐 디렉토리 환경변수 설정

$ vi ~/.profile


export MAVEN_HOME=/home/ubuntu/apache-maven-3.2.5

PATH=$PATH:$MAVEN_HOME/bin


$ source ~/.profile

$ mvn --version

Apache Maven 3.2.5 ~~~~


최종 환경변수 확인


$ printenv | grep JAVA

JAVA_6_HOME=/home/ubuntu/jdk1.6.0_45

JAVA_HOME=/home/ubuntu/jdk1.7.0_76

JAVA_7_HOME=/home/ubuntu/jdk1.7.0_76


2. 소스 다운로드

git으로 복사(git clone https://github.com/naver/pinpoint.git) 하거나 zip 다운로드(https://github.com/naver/pinpoint/archive/master.zip)


깃으로 복사하기


$ sudo apt-get update

$ sudo apt-get install git

git clone https://github.com/naver/pinpoint.git

$ cd pinpoint


깃 최신 릴리즈 확인


$ git tag -l

1.0.4

$git checkout tags/1.0.4

Note: checking out 'tags/1.0.4'.

~~~~


설치(test 생략)

$ mvn install -Dmaven.test.skip=true

[INFO] pinpoint ........................................... SUCCESS [  0.324 s]

[INFO] pinpoint-thrift .................................... SUCCESS [  0.903 s]

[INFO] pinpoint-commons ................................... SUCCESS [  1.830 s]

[INFO] pinpoint-bootstrap-core ............................ SUCCESS [  0.027 s]

[INFO] pinpoint-bootstrap ................................. SUCCESS [  0.441 s]

[INFO] pinpoint-rpc ....................................... SUCCESS [  0.068 s]

[INFO] pinpoint-profiler .................................. SUCCESS [  3.278 s]

[INFO] pinpoint-profiler-optional ......................... SUCCESS [  0.655 s]

[INFO] pinpoint-agent-distribution ........................ SUCCESS [ 47.300 s]

[INFO] pinpoint-collector ................................. SUCCESS [ 48.606 s]

[INFO] pinpoint-web ....................................... SUCCESS [ 38.050 s]

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------


** 현재(2015/4/22) cubrid maven repository 가 안되서 jar 다운받아 local repository로 설정 후 install.


3. Hbase 설치

$ quickstart/bin/start-hbase.sh

starting master, logging to /home/ubuntu/pinpoint/quickstart/hbase/hbase-0.94.25/bin/../logs/hbase-ubuntu-master-ip-10-188-131-203.out


$ quickstart/bin/init-hbase.sh

0 row(s) in 1.0370 seconds


TABLE                                                                                                            

AgentInfo                                                                                                        

AgentStat                                                                                                        

ApiMetaData                                                                                                      

ApplicationIndex                                                                                                 

ApplicationMapStatisticsCallee                                                                                   

ApplicationMapStatisticsCaller                                                                                   

ApplicationMapStatisticsSelf                                                                                     

ApplicationStatistics                                                                                            

ApplicationTraceIndex                                                                                            

HostApplicationMap                                                                                               

HostApplicationMap_Ver2                                                                                          

SqlMetaData                                                                                                      

StringMetaData                                                                                                   

Traces                                                                                                           

14 row(s) in 0.0260 seconds


4. Collector

$ quickstart/bin/start-collector.sh

starting pinpoint-quickstart-collector. 0 /180 sec(close wait limit).

starting pinpoint-quickstart-collector. 5 /180 sec(close wait limit).


...


---pinpoint-quickstart-collector initialization completed. pid=12701.---

04-22 08:11:52 [INFO ](c.n.p.c.r.u.BaseUDPReceiver        :132) start ioThread localAddress:0.0.0.0/0.0.0.0, IoThread:Pinpoint-UDP-Stat-Io(13-1)

04-22 08:11:52 [INFO ](c.n.p.c.r.u.BaseUDPReceiver        :132) start ioThread localAddress:0.0.0.0/0.0.0.0, IoThread:Pinpoint-UDP-Stat-Io(13-2)

04-22 08:11:52 [INFO ](c.n.p.c.r.u.BaseUDPReceiver        :132) start ioThread localAddress:0.0.0.0/0.0.0.0, IoThread:Pinpoint-UDP-Stat-Io(13-3)

04-22 08:11:52 [INFO ](c.n.p.c.r.u.BaseUDPReceiver        :132) start ioThread localAddress:0.0.0.0/0.0.0.0, IoThread:Pinpoint-UDP-Stat-Io(13-4)

04-22 08:11:52 [INFO ](c.n.p.c.r.u.BaseUDPReceiver        :132) start ioThread localAddress:0.0.0.0/0.0.0.0, IoThread:Pinpoint-UDP-Stat-Io(13-5)

04-22 08:11:52 [INFO ](c.n.p.c.r.u.BaseUDPReceiver        :132) start ioThread localAddress:0.0.0.0/0.0.0.0, IoThread:Pinpoint-UDP-Stat-Io(13-6)

04-22 08:11:52 [INFO ](c.n.p.c.r.u.BaseUDPReceiver        :132) start ioThread localAddress:0.0.0.0/0.0.0.0, IoThread:Pinpoint-UDP-Stat-Io(13-7)

04-22 08:11:52 [INFO ](o.s.w.c.ContextLoader              :313) Root WebApplicationContext: initialization completed in 1490 ms

Apr 22, 2015 8:11:52 AM org.apache.coyote.AbstractProtocol start

INFO: Starting ProtocolHandler ["http-bio-28082"]


5. Web-UI

다른 ssh 세션을 열고

$ quickstart/bin/start-web.sh

---check pinpoint-quickstart-web process status.---

---initialize pinpoint-quickstart-web logs.---

---pinpoint-quickstart-web initialization started. pid=15079.---

starting pinpoint-quickstart-web. 0 /180 sec(close wait limit).

starting pinpoint-quickstart-web. 5 /180 sec(close wait limit).


...


---pinpoint-quickstart-web initialization completed. pid=15079.---

08:14:24 INFO (m.a.DefaultAnnotationHandlerMapping:315) Mapped URL path [/getFilteredServerMapData/] onto handler 'filteredMapController'

08:14:24 INFO (m.a.DefaultAnnotationHandlerMapping:315) Mapped URL path [/command/echo] onto handler 'commandController'

08:14:24 INFO (m.a.DefaultAnnotationHandlerMapping:315) Mapped URL path [/command/echo.*] onto handler 'commandController'

08:14:24 INFO (m.a.DefaultAnnotationHandlerMapping:315) Mapped URL path [/command/echo/] onto handler 'commandController'

08:14:24 INFO (m.a.DefaultAnnotationHandlerMapping:315) Mapped URL path [/command/threadDump] onto handler 'commandController'

08:14:24 INFO (m.a.DefaultAnnotationHandlerMapping:315) Mapped URL path [/command/threadDump.*] onto handler 'commandController'

08:14:24 INFO (m.a.DefaultAnnotationHandlerMapping:315) Mapped URL path [/command/threadDump/] onto handler 'commandController'

08:14:24 INFO (o.s.w.s.DispatcherServlet          :473) FrameworkServlet 'pinpoint-web': initialization completed in 1298 ms

Apr 22, 2015 8:14:24 AM org.apache.coyote.AbstractProtocol start

INFO: Starting ProtocolHandler ["http-bio-28080"]


6. TestApp 실행

다른 ssh 세션을 열고

$ quickstart/bin/start-testapp.sh


브라우저를 열고 아래로 접속해서 확인


핀포인트 대시보드 : ip주소:28080

테스트앱: ip주소:28081


중앙에 나오는 것이 서버 요청 관계도?

상당 Last 시간별로 우측에 차트

1. 시간별 요청 성공(초록 점),실패(붉은점), 응답시간에 대한 차트, 

2. 응답시간별 횟수, 

3. 시간별 응답 누적 차트


하단 서버의 Inspector을 선택하면 서버 모니터링 됨


저작자 표시
신고
0 Comments
댓글쓰기 폼