Pinpoint Profile
Pinpoint is a large-scale distributed systems using Java / PHP written in the APM (application performance management) tools. Inspired by the Dapper, Pinpoint provides a solution that can help the overall structure and components of the system which analyzes how interconnected by tracking across distributed transaction applications.
Features:
- Clear understanding of your application topology
- Real-time monitoring of the application
- Obtain code-level visibility into every transaction
- Install APM agent without having to change any code
- Minimal impact on performance (resource usage amount increased by about 3%)
Reference git Address: https://github.com/naver/pinpoint
Pinpoint installation and deployment
Preparatory
In the present embodiment ContenOS 7.4 installed, and this need to pinpoint pinpoint-agent and hbase, zookeeper, git will need to use in the first installation package are downloaded good
hbase Download: https://hbase.apache.org/downloads.html , Pinpoint Download: https://github.com/naver/pinpoint/releases
Installation 2 servers it used, and a major deployment pinpoint pinpoint-agent, a major deployment hbase, zookeeper
-
- jdk8 --- Java Runtime Environment
- hbase-1.2.7 --- database (single version comes with zookeeper), is used to store monitoring information
- tomcat9.0 --- Web server
- pinpoint-collector-1.8.5.war --- pp controller
- pinpoint-web-1.8.5.war --- pp show page
- pinpoint-agent-1.8.5.tar.gz --- pp probe
Installation hbase
Mounted on the first server 192.168.1.5
1, in hbase hbase official website to download, in this case the installation is hbase-1.2.7 version, because there are pinpoint and hbase version compatibility issues that may lead to pinpoint collector can not write data to hbase
Installation Reference: [] HBase HBase stand-alone installation and use
hbase the following profile hbase-site.xml
1 <configuration> 2 <!-- hbase存放数据目录 --> 3 <property> 4 <name>hbase.rootdir</name> 5 <value>file:///data/soft/hbase-1.2.7/hbase</value> 6 </property> 7 8 <!-- ZooKeeper数据文件路径 --> 9 <property> 10 <name>hbase.zookeeper.property.dataDir</name> 11 <value>/data/soft/hbase-1.2.7/zookeeper</value> 12 </property> 13 14 <property> 15 <name>hbase.zookeeper.property.clientPort</name> 16 <value>12181</value> 17 </property> 18 19 20 <property> 21 <name>hbase.unsafe.stream.capability.enforce</name> 22 <value>false</value> 23 <description> 24 Controls whether HBase will check for stream capabilities (hflush/hsync). 25 26 Disable this if you intend to run on LocalFileSystem, denoted by a rootdir 27 with the 'file://' scheme, but be mindful of the NOTE below. 28 29 WARNING: Setting this to false blinds you to potential data loss and 30 inconsistent system state in the event of process and/or node failures. If 31 HBase is complaining of an inability to use hsync or hflush it's most 32 likely not a false positive. 33 </description> 34 </property> 35 36 </configuration>
Install and launch the hbase
2, the initialization Hbase Pinpoint library, download hase-create.hbase script file in the git, and installed base table
Download hase-create.hbase Address: https://github.com/naver/pinpoint/blob/master/hbase/scripts/hbase-create.hbase
Execute a script command: $ HBASE_HOME / bin / HBase HBase shell-create.hbase
3, after the completion of the implementation can view the table information in Hbase pages
Installation pinpoint-collector
Mounted on the second server 192.168.1.6
1, the downloaded pinpoint-collector-1.8.5.war decompression, and to move in webapp tomcat.
Unzip command: the unzip Pinpoint Pinpoint-Collector-Collector-1.8.5.war -d-1.8.5
Movement command: Music Videos Pinpoint-1.8.5-Collector / Data / Soft / Apache Tomcat--8081 / the webapps /
2, enter /data/soft/apache-tomcat-8081/webapps/pinpoint-collector-1.8.5/WEB-INF/classes directory, edit the configuration file
Hbase.properties modify files, configuration zookeeper address
Command: vim hbase.properties
1 hbase.client.host=192.168.1.5 2 hbase.client.port=12181
Modify pinpoint-collector.properties, configuration zookeeper address
Command: vim pinpoint-collector.properties
1 cluster.enable=true 2 cluster.zookeeper.address=192.168.1.5:12181 3 cluster.zookeeper.sessiontimeout=30000 4 cluster.listen.ip= 5 cluster.listen.port=
3、启动tomcat,即将pinpoint的收集器部署好了
安装pinpoint-agent
在第二台服务器192.168.1.6上安装
1、将下载好的pinpoint-agent-1.8.5.tar.gz进行解压
新建目录:mkdir /data/soft/pinpoint/pinpoint-agent-1.8.5
解压命令:tar -zxvf pinpoint-agent-1.8.5.tar.gz -C /data/soft/pinpoint/pinpoint-agent-1.8.5
2、在应用tomcat的bin/catalina.sh中,加入三句话,就安装好pinpoint的探针了,如下:
1 #2019-11-11 2 # 在20行增加如下字段 3 # 第一行是pp-agent的jar包位置 4 # 第二行是agent的ID,这个ID是唯一的,我是用pp + 今天的日期命名的,只要与其他的项目的ID不重复就好了 5 # 第三行是采集项目的名字,这个名字可以随便取,只要各个项目不重复就好了 6 CATALINA_OPTS="$CATALINA_OPTS -javaagent:/data/soft/pinpoint/pinpoint-agent-1.8.5/pinpoint-bootstrap-1.8.5.jar" 7 CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.agentId=pp20191112" 8 CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.applicationName=Tomcat8080"
3、重启应用tomcat,即可收集应用数据
安装pinpoint-web
在第二台服务器192.168.1.6上安装
1、将下载好的pinpoint-web-1.8.5.war解压,并移动到tomcat的webapp中。
解压命令:unzip pinpoint-web-1.8.5.war -d pinpoint
移动命令:mv pinpoint /data/soft/apache-tomcat-8081/webapps/
2、进入/data/soft/apache-tomcat-8081/webapps/pinpoint/WEB-INF/classes目录,编辑配置文件
修改hbase.properties文件,配置zookeeper地址
命令:vim hbase.properties
1 hbase.client.host=192.168.1.5 2 hbase.client.port=12181
修改pinpoint-web.properties文件,配置zookeeper地址
命令:vim pinpoint-web.properties
1 cluster.enable=true 2 cluster.web.tcp.port=9997 3 cluster.zookeeper.address=192.168.1.5:12181 4 cluster.zookeeper.sessiontimeout=30000 5 cluster.zookeeper.retry.interval=60000 6 cluster.connect.address=
3、重启应用tomcat8081,即可收集应用数据,使用地址http://192.168.1.6:8081/pinpiont,即可访问pinpiont的web界面
4、在界面中选择一个应用即可看到应用使用的情况