Pinpoint e is a large-scale distributed system performance management tool written in Java, can track requests, hardware information collection, request time statistics and so on project home page: github.com/naver/pinpo…

The premise

  • There are distributed deployment projects available for testing
  • At least one server
  • Java, Hbase, Zookeeper, and Tomcat environments

instructions

  • Personally, I do not like the HBASE ZK. If you do not like it, please feel free to do so
  • This article does not cover setting up the basic environment, if not, please search for it or refer to other articles on this blog
  • You are advised to disable the firewall to avoid suspicious problems, such as faulty ports

download

Wget wget HTTP: / / https://github.com/naver/pinpoint/releases/download/1.6.2/pinpoint-agent-1.6.2.tar.gz https://github.com/naver/pinpoint/releases/download/1.6.2/pinpoint-collector-1.6.2.war wget https://github.com/naver/pinpoint/releases/download/1.6.2/pinpoint-web-1.6.2.war wget https://raw.githubusercontent.com/naver/pinpoint/master/hbase/scripts/hbase-create.hbaseCopy the code

Prepare the environment

  1. Configure the JDK environment (Oracle 1.8, openJdk can)
  2. Setting up the Zookeeper Environment (standalone)
  3. Hbase Building (only one node)
  4. Run the command in Hbase/bin./hbase shell hbase-create.hbaseCreate related storage structures
  5. Preparing the Tomcat Environment

Zookeeper is used for Pinpoint cluster deployment and can be shared with Hbase if desired

Deployment instructions

Pinpoint Pinpoint is divided into three modules (Agent, collector, Web)

  • Agent: a tar package is decompressed and run to modify the bytecode of the project and collect information. The Agent must be deployed on the server where the project is deployed
  • Collector: War package, which collects and collects information uploaded by agents and stores it to hbase for persistence. Only one server can be deployed
  • Web: WAR package, responsible for the visualization of data, only a single deployment can be, horizontal expansion

Note: Web and Collector can be deployed separately or together, and this article will deploy them both in the same Tomcat container

Modify the Pinpoint

Pinpoint the collector – 1.6.2. War

Modify the setting of web-INF \classes\hbase.properties file hbase.client.host to the ZK address used by hbase WEB - INF \ classes \ pinpoint - collector. The properties file cluster. The zookeeper. Address changes for to pinpoint the zk addressCopy the code

Pinpoint – web – 1.6.2. War

Modify the setting of web-INF \classes\hbase.properties file hbase.client.host to the ZK address used by hbase WEB - INF \ classes \ hbase properties \ pinpoint - WEB properties file cluster. The zookeeper. Address changes for to pinpoint the zk addressCopy the code

Deploy the Collector and Web

  1. Delete the Webapps directory in the prepared Tomcat
  2. Place the two war packages fixed in the previous step into the Webapps
  3. willPinpoint - web - 1.6.2. WarModified toROOT.war
  4. willPinpoint the collector - 1.6.2. WarModified tocollector.war
  5. Start Tomcat

Check whether logs under Tomcat /logs fail to connect to port 2181. If yes, the configuration in WAR may be incorrect. You are advised to clear the Work and temp folders under Tomcat and try again

The deployment of the agent

  1. Pinch-agent-1.6.2.tar. gz decompression, pinpoint agent
  2. Pinpoint. Config file into the pinpointprofiler.collector.ipChange the property value to the host name or IP address of the machine where the Collector is deployed

Note: The Agent needs to be deployed on each server where the project is located

Modify the startup parameters of your own project

You need to add three startup parameters

- javaagent: point to pinpoint agent directory - the bootstrap - 1.6.2. Jar - Dpinpoint. AgentId: set the global only labeled ID - Dpinpoint. ApplicationName: Set the name of the project (if two instances are deployed for the same project, they should have the same parameters)Copy the code

You can add the Tomcat and Jar projects in different ways

Tomcat

Go to bin/catalina.sh and add the following code

CATALINA_OPTS="$CATALINA_OPTS -javaagent:$AGENT_PATH/ pinpoint - the bootstrap - 1.6.2. Jar"
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.agentId=tomcat1"
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.applicationName=webcontroller"Copy the code

SpringBoot

Java - javaagent: / home/junbaor/pinpoint - agent/pinpoint - the bootstrap - 1.6.2. Jar - Dpinpoint. AgentId = BBS - web - 1 - Dpinpoint. ApplicationName = BBS BBS - web - jar - web - 0.0.1 - the SNAPSHOT. The jar

After the project is added and started, you can log in to the Web background to check the status of the cluster and track requests

Preview screenshots

Picture description

The green dot in the upper right corner indicates the request, and you can view the details after selecting it with the mouse

Picture description


Picture description


Picture description


Picture description


Picture description