ElasticSearch/ELK
ELK APM(with 6.6 살펴보기) - #2
달사자!
2019. 2. 18. 02:26
1편에서 기본 준비를 완료하였고 해당 문서는 테스트를 위한 내용을 담음
- java
- 테스트용 프로그램을 만들어서 서버에서 실행
- 테스트프로그램 다운로드 : wget 'https://github.com/oshnew/ELK-Study/raw/master/apm/sample-program/hello-demo.jar' -O hello-demo.jar
- APM agent 다운로드 : wget 'https://search.maven.org/remotecontent?filepath=co/elastic/apm/elastic-apm-agent/1.3.0/elastic-apm-agent-1.3.0.jar' -O 'elastic-apm-agent-1.3.0.jar'
- 참고: APM agent없이 배포 : java -jar -Dserver.port=8700 hello-demo.jar
- APM agent와 함께 실행
java \
-javaagent:elastic-apm-agent-1.3.0.jar\
-Delastic.apm.service_name=hello-demo\
-Delastic.apm.server_url=http://localhost:8200\
-Delastic.apm.application_packages=org.example\
-jar -Dserver.port=9878 hello-demo.jar
- 트래픽 발생
- 확인(로컬 Virtual box에서 실행 함)
- kibana -> APM 메뉴에서 확인 (http://10.95.164.30:5601/app/apm#/hello-demo/transactions?_g=()