Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and deploy Pinpoint distributed Monitoring in Centos7 system

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to install and deploy Pinpoint distributed monitoring in Centos7 system". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to install and deploy Pinpoint distributed monitoring in Centos7 system.

Overview

Pinpoint is an open source APM monitoring tool on github. It is written in Java and is used for large-scale distributed system monitoring. It has the least impact on performance (only increases the resource utilization by about 3%). The installation of agent is non-invasive, and you only need to add 3 sentences to the tested Tomcat and make a probe to monitor the whole program. The main purpose of today is to record the process of its installation for future reference.

Environment configuration

The configuration is as follows:

Baidu network disk: link: https://pan.baidu.com/s/17l8nFR94Oy_OnfH7ST67ag

Extraction code: l851

Here are some official screenshots:

1. Environment configuration

1.1 get the required dependency packages

Go to the home directory and create a "pp_res" resource directory to store the packages that need to be installed.

Mkdir / home/pp_res cd / home/pp_res/

Use xshell and other similar tools to upload the required files to the Linux virtual machine, and the main files to be uploaded are in Baidu network disk.

Hongmeng official Strategic Cooperation to build HarmonyOS Technology Community

Jdk8-Java operating environment

Hbase-1.0-database, which is used to store monitoring information

Tomcat8-Web server

Pinpoint-collector.war-the controller of pp

Pinpoint-web.war-pp display page

Pp-collector.init-used to quickly start pp-col. If you don't need it, you can.

Pp-web.init-used to quickly start pp-web. If you don't need it, you can.

1.2 configure jdk1.8

This APM system is mainly deployed with jdk1.8, the first step is to configure the environment variables of jdk.

# tar-xvf jdk-8u191-linux-x64.tar.gz-C / usr/local/jdk

# mv / usr/local/1.8.0_191 / usr/local/jdk

Configure java environment variables

# vi / etc/profile

JAVA_HOME=/usr/local/jdk JRE_HOME=$JAVA_HOME/jre PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin CLASSPATH=:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib/dt.jar export JAVA_HOME JRE_HOME PATH CLASSPATH export PATH

Let the environment variable take effect

# source / etc/profile

Test whether the environment variables for java are configured.

# java-version

2. Install Hbase

The test data collected by pinpoint mainly exists in the Hbase database. So it can collect a lot of data and analyze it in more detail.

2.1 extract the Hbase and put it in the specified directory

Cd / home/pp_res/ tar-zxvf hbase-1.0.3-bin.tar.gz mkdir-p / data/service mv hbase-1.0.3/ / data/service/hbase

2.2 modify the JAVA_HOME environment variable location of hbase-env.sh

Cd / data/service/hbase/conf/ vi hbase-env.sh

At the position of about 27 lines, modify as follows:

Export JAVA_HOME=/usr/local/jdk

2.3 modify the configuration information of Hbase

# vi hbase-site.xml

At the end, it is modified as follows, here we specify the Hbase to store the data locally, and the production environment stores the data recommendations in HDFS.

Hbase.rootdir file:///data/hbase

2.4 start hbase

Cd / data/service/hbase/bin. / start-hbase.sh

Check to see if Hbase starts successfully, and if it starts successfully, you will see the process of "HMaster".

2.5 initialize the pinpoint library for Hbase

Execute the Hbase initialization statement provided by pinpoint, which initializes for a while.

. / hbase shell / home/pp_res/hbase-create.hbase

When you are done, enter Hbase.

. / hbase shell

After entering, you can see the version of Hbase, as well as some related information.

Enter "status' detailed'" to see if the table you just initialized exists.

Hbase (main): 001status 0 > detailed'

You can also log in to web to see if HBase's data is initialized successfully.

HbaseWeb: http://172.26.150.143:16010/master-status

3. Install pinpoint-collector

3.1 deploy the war package

Extract the Tomcat and move the Tomcat rename to the specified location, which is not covered in this section. The port planning is 17032.

Deploy the pinpoint-collector.war package:

Cd / home/pp_res/ unzip pinpoint-collector-1.5.2.war-d / data/service/tomcat17032/webapps/ROOT

Restart Tomcat:

Cd / data/service/tomcat17032/bin. / startup.sh

View the log:

Tail-200f catalina.out

4. Install pinpoint-web

4.1 deploy the war package

1) deploy the pinpoint-collector.war package

Cd / home/pp_res/ unzip pinpoint-web-1.5.2.war-d / home/tomcat7032/webapps/ROOT

Here's an explanation:

Hbase.properties configures the data source from which our pp-web gets the collected data. Here we only specify the zookeeper address of Hbase.

Connection authentication configuration for jdbc.properties pp-web to connect to its own Mysql database.

The sql directory pp-web itself has some data that needs to be stored in the MySQL database. Here you need to initialize the table structure.

Pinpoint-web.properties the configuration file for the pp-web cluster here, if you need a pp-web cluster.

These applicationContext-* .xml files will be used in subsequent tuning efforts.

Configuration related to log4j.xml logs.

2) start Tomcat

Cd / home/tomcat7032/bin. / startup.sh

3) Test access

Type "http://172.26.150.143:7032"" in the browser and the main page will appear.

4.2.Configuring mysql

1) create a mysql

Create database pinpoint default character set utf8; grant all privileges on mysql.* to admin@'%' identified by 'admin@123'; grant all privileges on pinpoint.* to admin@'%' identified by' admin@123'

2) Import data

3) modify the configuration file

5. Deploy pp-agent to collect monitoring data

5.1 in the test system, deploy pp-agent to collect monitoring data

It's easy to deploy the collector, just add three words. I do a test Tomcat here to simulate deployment.

First, set up a folder and put the packages needed for the test

Mkdir / home/pp_test cd / home/pp_test

5.2 configure pp-agent Collector

1) decompress pp-agent

Cd / home/pp_test tar-xvf pinpoint-agent-1.5.2.tar.gz-C / data mv / data/pinpoint-agent-1.5.2/ / data/pp-agent

2) Edit configuration file

Vi / data/pp-agent/pinpoint.config

# mainly modify IP. You only need to specify the IP where pp-col is installed. After installing pp-col, the port 999499959996 will be opened automatically. Don't worry about it here. If you have port requirements, go to pp-col 's configuration file ("pp-col/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties") to modify these ports.

Profiler.collector.ip=172.26.150.143

3) modify the tomcat startup file "catalina.sh" under the test project, modify this as long as it is to monitor the Tomcat of the test environment, and add probes

Vi / home/tomcat7030/bin/catalina.sh

Add the following fields to line 20

* Line is the jar package location of pp-agent

The second line is agent's ID, this ID is * *, I named it with pp + today's date, as long as it doesn't repeat the ID of other projects.

The third line is the name of the collection project, which can be chosen freely, as long as each item is not repeated.

CATALINA_OPTS= "$CATALINA_OPTS-javaagent:/data/pp-agent/pinpoint-bootstrap-1.5.2.jar" CATALINA_OPTS= "$CATALINA_OPTS-Dpinpoint.agentId=AMS-UAT153" CATALINA_OPTS= "$CATALINA_OPTS-Dpinpoint.applicationName=AMS-UAT153"

5.4 Monitoring Tomcat

It's all set. You can start monitoring and start the Tomcat server for testing.

Cd / home/tomcat7030/bin. / startup.sh

Check the startup log and make sure that Tomcat starts.

Tail-f.. / logs/catalina.out

When started, we can access the test environment.

At this time, when you visit pp-web, you can find that there is an extra app in its drop-down box (and the logs monitored by pp-agent will also be displayed in the logs of pp-col).

Specific request:

Thank you for reading, the above is the content of "how to install and deploy Pinpoint distributed monitoring in Centos7 system". After the study of this article, I believe you have a deeper understanding of how to install and deploy Pinpoint distributed monitoring in Centos7 system, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report