Esacpe 2018-03-19
Pinpoint
1. Install pinpoint-server
下载镜像
docker pull yous/pinpoint
查看镜像
docker images
启动容器
docker run -d --name=pinpoint -p 28080-28082:28080-28082 --cap-add SYS_PTRACE yous/pinpoint docker run -i -t --name=pinpoint -p 28080-28082:28080-28082 --cap-add SYS_PTRACE yous/pinpoint:latest bash
进入docker bash
docker exec -it pinpoint /bin/bash
启动hbase
quickstart/bin/start-hbase.sh
初始化table
quickstart/bin/init-hbase.sh
Start Pinpoint Daemons
Collector: quickstart/bin/start-collector.sh Web UI: quickstart/bin/start-web.sh TestApp: quickstart/bin/start-testapp.sh
端口映射(容器已运行)
agent: pinpoint.config collection: pinpoint-collector.properties # 将容器的29994端口映射到docker主机的29994端口 iptables -t nat -A DOCKER -p tcp --dport 29994 -j DNAT --to-destination 172.17.0.35:29994 iptables -t nat -A DOCKER -p udp --dport 29995 -j DNAT --to-destination 172.17.0.35:29995 iptables -t nat -A DOCKER -p udp --dport 29996 -j DNAT --to-destination 172.17.0.35:29996
查看进程
docker ps
查看端口
docker port pinpoint
2. 配置pinpoint-agent
修改pinpoint.config
[ip] profiler.collector.ip=192.168.100.106 [tcp port] profiler.collector.tcp.port=29994 [udp span port] profiler.collector.span.port=29996 [udp stat port] profiler.collector.stat.port=29995
添加tomcat启动参数
开发环境: [IDEA VM option] -javaagent:/home/linxiaojun/Public/software/tools/pinpoint-agent/pinpoint-bootstrap-1.6.1.jar -Dpinpoint.agentId=1001 -Dpinpoint.applicationName=just-edu 生产环境: [Tomcat] CATALINA_OPTS=-javaagent:/home/linxiaojun/Public/software/tools/pinpoint-agent-1.6.1/pinpoint-bootstrap-1.6.1.jar -Dpinpoint.agentId=1001 -Dpinpoint.applicationName=just-edu
3. 浏览界面
Web UI: http://localhost:28080
TestApp: http://localhost:28081
4. 参考网站