Pinpoint 分布式系统性能监控工具(Pinpoint distributed system performance monitoring tool)

Pinpoint 是什么

Pinpoint是一款全链路分析工具,提供了无侵入式的调用链监控、方法执行详情查看、应用状态信息监控等功能。基于GoogleDapper论文进行的实现,与另一款开源的全链路分析工具Zipkin类似,但相比Zipkin提供了无侵入式、代码维度的监控等更多的特性。 Pinpoint支持的功能比较丰富,可以支持如下几种功能:

服务拓扑图:对整个系统中应用的调用关系进行了可视化的展示,单击某个服务节点,可以显示该节点的详细信息,比如当前节点状态、请求数量等实时活跃线程图:监控应用内活跃线程的执行情况,对应用的线程执行性能可以有比较直观的了解请求响应散点图:以时间维度进行请求计数和响应时间的展示,拖过拖动图表可以选择对应的请求查看执行的详细情况请求调用栈查看:对分布式环境中每个请求提供了代码维度的可见性,可以在页面中查看请求针对到代码维度的执行详情,帮助查找请求的瓶颈和故障原因。应用状态、机器状态检查:通过这个功能可以查看相关应用程序的其他的一些详细信息,比如CPU使用情况,内存状态、垃圾收集状态,TPS和JVM信息等参数。

架构组成

Pinpoint 主要由 3 个组件外加 Hbase 数据库组成,三个组件分别为:Agent、Collector 和 Web UI。

Agent组件:用于收集应用端监控数据,无侵入式,只需要在启动命令中加入部分参数即可Collector组件:数据收集模块,接收Agent发送过来的监控数据,并存储到HBaseWebUI:监控展示模块,展示系统调用关系、调用详情、应用状态等,并支持报警等功能

安装Collector组件

# 克隆官方提供的docker git
git clone https://github.com/naver/pinpoint-docker.git
cd pinpoint-docker
# 1.7.3版本需要将 pinpoint-docker/docker-compose.yml的第17行和第18行修改为绝对路径,否则会启动报错(docker 17.03版本测试)
# 如需修改相关组件的ip和端口,请修改pinpoint-Docker/.env文件
docker-compose pull && docker-compose up -d
# 启动完成后访问网页 http://localhost:8081/#/submit 将pinpoint-docker/pinpoint-flink/build/pinpoint-flink-job-{pinpoint-version}.jar 文件手动upload到flik组件中,上传的版本需要和pinpoint保持一致
# 访问:http://localhost:8079/ 即可浏览pinpoint页面
# 官方说明:https://github.com/naver/pinpoint-docker

安装Agent组件

访问 https://github.com/naver/pinpoint/releases 下载和 Collector组件 相同版本的pinpoint-agent压缩包。

解压pinpoint-agent压缩包,找到 pinpoint.config 文件,修改为你对应环境的配置。一般情况只需要修改配置项 profiler.collector.ip=127.0.0.1 为你自己的Collector组件的IP。

# 注意:2.0.0 版本及其以上 
pinpoint.config 文件新增了多环境配置项
pinpoint.profiler.profiles.active=release

假如:你的agent存放在:E:\pinpoint-agent-2.0.1
那么:你需要修改的文件在 E:\pinpoint-agent-2.0.1\profiles\release 目录下
如果你的点击了多次请求,发现只有少量的数据,需要配置  profiler.sampling.rate=1

配置应用程序

// 如果你在多台机器上部署了应用程序,那么就需要在多台机器上部署Agent组件// p i n p o i n t P a t h 是 a g e n t 组 件 存 放 的 路 径 , 类 似 于 J A V A H O M E / / 在 j a v a 启 动 命 令 中 加 入 如 下 参 数 j a v a a g e n t : {pinpointPath}是agent组件存放的路径,类似于JAVA_HOME // 在java启动命令中加入如下参数 -javaagent:pinpointPath是agent组件存放的路径,类似于JAVAHOME//在java启动命令中加入如下参数javaagent:{pinpointPath}/pinpoint-bootstrap-1.7.3.jar-Dpinpoint.applicationName= // 在pinpoint上显示的名字-Dpinpoint.agentId= // id,可以和applicationName相同,也可以不同

访问

动程序,访问一下,就可以在pinpoint上看见相关数据。

官方DEMO地址

demo演示地址: pinpoint demo

pinpoint github: pinpoint

————————

Pinpoint 是什么

Pinpoint is a full link analysis tool, which provides non intrusive call chain monitoring, method execution details viewing, application status information monitoring and other functions. The implementation based on Google dapper paper is similar to another open source full link analysis tool Zipkin, but Zipkin provides more features such as non intrusive and code dimension monitoring. Pinpoint supports rich functions and can support the following functions:

Service topology diagram: visually display the calling relationship of applications in the whole system. Click a service node to display the details of the node, such as current node status, number of requests and other real-time active threads diagram: monitor the execution of active threads in the application, You can have a more intuitive understanding of the thread execution performance of the application. The request response scatter chart: display the request count and response time in the time dimension. Drag the chart to select the corresponding request to view the execution details. View the request call stack: it provides the visibility of the code dimension for each request in the distributed environment, You can view the execution details of the request to the code dimension on the page to help find the bottleneck and failure cause of the request. Application status and machine status check: through this function, you can view other detailed information of related applications, such as CPU usage, memory status, garbage collection status, TPS and JVM information and other parameters.

Architecture Composition

Pinpoint is mainly composed of three components plus HBase database. The three components are agent, collector and Web UI.

Agent component: it is used to collect application side monitoring data without intrusion. It only needs to add some parameters to the startup command. Collector component: data collection module, which receives the monitoring data sent by the agent and stores it in HBase webui: monitoring display module, which displays the system call relationship, call details, application status, etc., and supports alarm and other functions

安装Collector组件

# 克隆官方提供的docker git
git clone https://github.com/naver/pinpoint-docker.git
cd pinpoint-docker
# 1.7.3版本需要将 pinpoint-docker/docker-compose.yml的第17行和第18行修改为绝对路径,否则会启动报错(docker 17.03版本测试)
# 如需修改相关组件的ip和端口,请修改pinpoint-Docker/.env文件
docker-compose pull && docker-compose up -d
# 启动完成后访问网页 http://localhost:8081/#/submit 将pinpoint-docker/pinpoint-flink/build/pinpoint-flink-job-{pinpoint-version}.jar 文件手动upload到flik组件中,上传的版本需要和pinpoint保持一致
# 访问:http://localhost:8079/ 即可浏览pinpoint页面
# 官方说明:https://github.com/naver/pinpoint-docker

安装Agent组件

访问 https://github.com/naver/pinpoint/releases 下载和 Collector组件 相同版本的pinpoint-agent压缩包。

Unzip the compressed package of pinpoint agent and find the pinpoint Config file to modify the configuration of your corresponding environment. Generally, you only need to modify the configuration item profiler collector. IP = 127.0.0.1 is the IP of your own collector component.

# 注意:2.0.0 版本及其以上 
pinpoint.config 文件新增了多环境配置项
pinpoint.profiler.profiles.active=release

假如:你的agent存放在:E:\pinpoint-agent-2.0.1
那么:你需要修改的文件在 E:\pinpoint-agent-2.0.1\profiles\release 目录下
如果你的点击了多次请求,发现只有少量的数据,需要配置  profiler.sampling.rate=1

Configure application

//If you deploy applications on multiple machines, you need to deploy agent components on multiple machines. / / p i n p o i n t p a t h is the path where a g e n t components are stored, similar to j a V a h o m e / / add the following parameters to the j a V a g e n t in the j a V a startup command: {pinpointpath} is the path where agent components are stored, similar to Java_ Home / / add the following parameter to the Java startup command – javaagent: pinpointpath is the path where the agent component is stored, similar to javahome / / add the following parameter to the Java startup command: javaagent: {pinpointpath} / pinpoint-bootstrap-1.7.3 jar-Dpinpoint. ApplicationName = / / name displayed on pinpoint – dpinpoint AgentID = / / ID, which can be the same as or different from ApplicationName

visit

动程序,访问一下,就可以在pinpoint上看见相关数据。

Official demo address

demo演示地址: pinpoint demo

pinpoint github: pinpoint