参考

https://github.com/naver/pinpoint-docker https://www.cnblogs.com/zz0412/p/9333296.html https://blog.csdn.net/qq\_21816375/article/details/80455681

简介 Pinpoint是一款全链路分析工具,提供了无侵入式的调用链监控、方法执行详情查看、应用状态信息监控等功能。基于GoogleDapper论文进行的实现,与另一款开源的全链路分析工具Zipkin类似,但相比Zipkin提供了无侵入式、代码维度的监控等更多的特性。 Pinpoint支持的功能比较丰富,可以支持如下几种功能: - 服务拓扑图:对整个系统中应用的调用关系进行了可视化的展示,单击某个服务节点,可以显示该节点的详细信息,比如当前节点状态、请求数量等 实时活跃线程图:监控应用内活跃线程的执行情况,对应用的线程执行性能可以有比较直观的了解 - 请求响应散点图:以时间维度进行请求计数和响应时间的展示,拖过拖动图表可以选择对应的请求查看执行的详细情况 - 请求调用栈查看:对分布式环境中每个请求提供了代码维度的可见性,可以在页面中查看请求针对到代码维度的执行详情,帮助查找请求的瓶颈和故障原因。 - 应用状态、机器状态检查:通过这个功能可以查看相关应用程序的其他的一些详细信息,比如CPU使用情况,内存状态、垃圾收集状态,TPS和JVM信息等参数。

架构组成 Pinpoint 主要由 3 个组件外加 Hbase 数据库组成,三个组件分别为:Agent、Collector 和 Web UI。 - Agent组件:用于收集应用端监控数据,无侵入式,只需要在启动命令中加入部分参数即可 - Collector组件:数据收集模块,接收Agent发送过来的监控数据,并存储到HBase - WebUI:监控展示模块,展示系统调用关系、调用详情、应用状态等,并支持报警等功能

部署 1.安装docker docker-compose

1
2
3
4
yum update -y
yum install docker epel-release python-pip -y
pip install --upgrade pip
pip install docker-compose

报错

1
2
  Found existing installation: requests 2.6.0
Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstal

排错

1
2
3
https://github.com/docker/compose/issues/5883
与pip版本有关
pip install --upgrade --force-reinstall pip==9.0.3

2.部署pinpoint git clone https://github.com/naver/pinpoint-docker.git cd pinpoint-docker docker-compose pull && docker-compose up -d

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
[root@VM_8_77_centos ~]# git clone https://github.com/naver/pinpoint-docker.git
Cloning into 'pinpoint-docker'...
remote: Enumerating objects: 269, done.
remote: Total 269 (delta 0), reused 0 (delta 0), pack-reused 269
Receiving objects: 100% (269/269), 167.23 MiB | 649.00 KiB/s, done.
Resolving deltas: 100% (129/129), done.

[root@VM_8_77_centos ~]# cd pinpoint-docker
[root@VM_8_77_centos pinpoint-docker]# ls
docker-compose.yml pinpoint-agent pinpoint-flink pinpoint-quickstart Readme.md
docs pinpoint-agent-attach-example pinpoint-hbase pinpoint-web
License pinpoint-collector pinpoint-mysql pinpoint-zookeeper

[root@VM_8_77_centos pinpoint-docker]# docker-compose pull && docker-compose up -d
Pulling jobmanager ... done
Pulling zoo2 ... done
Pulling taskmanager ... done
Pulling zoo1 ... done
Pulling zoo3 ... done
Pulling pinpoint-mysql ... done
Pulling pinpoint-hbase ... done
Pulling pinpoint-web ... done
Pulling pinpoint-collector ... done
Pulling pinpoint-agent ... done
Pulling pinpoint-quickstart ... done
Creating network "pinpoint-docker_pinpoint" with driver "bridge"
Creating volume "pinpoint-docker_data-volume" with default driver
Creating volume "pinpoint-docker_mysql_data" with default driver
Creating pinpoint-docker_zoo2_1 ... done
Creating pinpoint-docker_zoo3_1 ... done
Creating pinpoint-mysql ... done
Creating pinpoint-hbase ... done
Creating pinpoint-flink-jobmanager ... done
Creating pinpoint-docker_zoo1_1 ... done
Creating pinpoint-flink-taskmanager ... done
Creating pinpoint-web ... done
Creating pinpoint-collector ... done
Creating pinpoint-agent ... done
Creating pinpoint-quickstart ... done

3.检查镜像及进程

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[root@VM_8_77_centos pinpoint-docker]# docker images 
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/zookeeper 3.4 4c7dee7bb5a5 2 weeks ago 150 MB
docker.io/pinpointdocker/pinpoint-agent 1.8.2 1c148b50ec86 6 weeks ago 27.2 MB
docker.io/pinpointdocker/pinpoint-hbase 1.8.2 f851bde92ec0 6 weeks ago 993 MB
docker.io/pinpointdocker/pinpoint-mysql 1.8.2 bf4cdc9f9506 6 weeks ago 390 MB
docker.io/pinpointdocker/pinpoint-web 1.8.2 a0fa17b655a5 6 weeks ago 598 MB
docker.io/pinpointdocker/pinpoint-collector 1.8.2 c6e189845eef 6 weeks ago 533 MB
docker.io/pinpointdocker/pinpoint-quickstart latest 125fa49a4a38 10 months ago 566 MB
docker.io/flink 1.3.1 c08ccd5bb7a6 21 months ago 480 MB


[root@VM_8_77_centos pinpoint-docker]# docker-compose ps
Name Command State Ports
-------------------------------------------------------------------------------------------------------------------------
pinpoint-agent /usr/local/bin/configure-a ... Up
pinpoint-collector /usr/local/bin/start-colle ... Up 8080/tcp, 0.0.0.0:9994->9994/tcp,
0.0.0.0:9995->9995/tcp, 0.0.0.0:9995->9995/udp,
0.0.0.0:9996->9996/tcp, 0.0.0.0:9996->9996/udp
pinpoint-docker_zoo1_1 /docker-entrypoint.sh zkSe ... Up 2181/tcp, 2888/tcp, 3888/tcp
pinpoint-docker_zoo2_1 /docker-entrypoint.sh zkSe ... Up 2181/tcp, 2888/tcp, 3888/tcp
pinpoint-docker_zoo3_1 /docker-entrypoint.sh zkSe ... Up 2181/tcp, 2888/tcp, 3888/tcp
pinpoint-flink-jobmanager /docker-entrypoint.sh jobm ... Up 6123/tcp, 0.0.0.0:8081->8081/tcp
pinpoint-flink-taskmanager /docker-entrypoint.sh task ... Up 0.0.0.0:19994->19994/tcp, 0.0.0.0:6121->6121/tcp,
0.0.0.0:6122->6122/tcp, 6123/tcp, 8081/tcp
pinpoint-hbase /bin/sh -c ${BASE_DIR}/hba ... Up 0.0.0.0:16010->16010/tcp, 0.0.0.0:16030->16030/tcp,
0.0.0.0:2180->2181/tcp, 0.0.0.0:60000->60000/tcp,
0.0.0.0:60020->60020/tcp
pinpoint-mysql docker-entrypoint.sh mysqld Up 0.0.0.0:13306->3306/tcp, 33060/tcp
pinpoint-quickstart catalina.sh run Up 0.0.0.0:8000->8080/tcp
pinpoint-web /usr/local/bin/start-web.sh Up 0.0.0.0:8079->8080/tcp, 0.0.0.0:9997->9997/tcp

访问 Pinpoint页面 http://10.2.8.77:8079/#/main

Apache Flink Daskboard http://10.2.8.77:8081/#/overview

Habse页面 http://10.2.8.77:16010/master-status