- What's New
-
Service Overview(2.0)
- What Is APM
- Functions
- Application Scenarios
- Basic Concepts
- Edition Differences
- Permissions Management
-
Metric Overview
- Exception
- Basic Monitoring
-
Databases
- C3P0 Connection Pool Monitoring
- Cassandra Monitoring
- ClickHouse Database
- DBCP Connection Pool Monitoring
- Druid Connection Pool Monitoring
- EsRestClient Monitoring
- GaussDB Database
- HBase Monitoring
- Hikari Connection Pool Monitoring
- Jetcd Monitoring
- MongoDB Monitoring
- MySQL Database
- ObsClient Monitoring
- Oracle Database
- PostgreSQL Database
- URLs
- External Calls
- Cache
- Agent Monitoring
- Tomcat Monitoring
- Message Queues
- RPC
- IoT
- Communication Protocol
- Privacy and Sensitive Information Protection Statement
- Data Collection
- Usage Restrictions
- Billing
- JavaAgent Updates
- Billing(2.0)
- Getting Started(2.0)
-
User Guide(2.0)
- Before You Start
- Application List
- CMDB Management
-
Application Metric Monitoring
- Overview
- Application Monitoring Details
-
Application Monitoring Configuration
- Configuration Details
- Configuring the MySQL Monitoring Item
- Configuring the HttpClient Monitoring Item
- Configuring the URL Monitoring Item
- Configuring the JavaMethod Monitoring Item
- Configuring the Druid Monitoring Item
- Configuring the ApacheHttpAsyncClient Monitoring Item
- Configuring the Redis Monitoring Item
- Configuring the Jedis Monitoring Item
- Configuring the HBase Monitoring Item
- Configuring the ApacheHttpClient Monitoring Item
- Configuring the Tomcat Monitoring Item
- Configuring the EsRestClient Monitoring Item
- Configuring the WebSocket Monitoring Item
- Configuring the KafkaProducer Monitoring Item
- Configuring the Hikari Monitoring Item
- Configuring the Exception Monitoring Item
- Configuring the Thread Monitoring Item
- Configuring the GC Monitoring Item
- Configuring the JVMInfo Monitoring Item
- Configuring the JVMMonitor Monitoring Item
- Configuring ProbeInfo Monitoring Item
- Monitoring Item Views
- Instance
- Collection Status
- Component Settings
- Tracing
- Application Topology
- URL Tracing
- Resource Tag Management
- Managing Tags
- Alarm Management
- AgentAgent Management
- Configuration Management
- System Management
- Permissions Management
- Change History
-
API Reference(2.0)
- Before You Start
- API Overview
- Calling APIs
- Examples
-
APIs
-
APM
- Querying the application list.
- Querying the Master Address
- Obtaining the AK/SK
- Searching for Components, Environments, and Agents in a Region
- Saving a Monitoring Item
- Querying the Monitoring Item List
- Querying All Agents of an Application
- Enabling or Disabling Collection for an Instance
- Deleting an Agent
- REGION
- CMDB
-
VIEW
- Querying Monitoring Item Configurations
- Querying the Trace Topology
- Querying Event Details
- Querying Span Data
- Obtaining All Data of a Trace
- Obtaining the Trend Graph
- Obtaining Summary Table Data
- Obtaining the Raw Data Table
- Obtaining Raw Data Details
- Obtaining the Instance Information
- Obtaining the Monitoring Item Information
- Obtaining the Details About a Monitoring Item
- AKSK
- ALARM
- TOPOLOGY
- TRANSACTION
- TRACING
-
APM
- Permissions Policies and Supported Actions
- Appendix
- Change History
- Best Practices(2.0)
- FAQs(2.0)
- Service Overview(1.0)
- Getting Started(1.0)
- Best Practices(1.0)
- User Guide
- API Reference
- SDK Reference
-
FAQs
- General FAQs
- Consultation FAQs
-
Usage FAQs
- How Do I Obtain the AK/SK and Project ID?
- How Do I Obtain the AK/SK by Creating an Agency?
- What Can I Do If No Data Is Found or the Data Is Abnormal?
- How Do I Connect APM to Non-Web Programs?
- How Are Tracing Time Lines Drawn?
- How Does APM Collect Probe Data?
- How Does APM Collect Mesh Data?
- How Do I Calculate the Number of Used Instances?
- How Do I Connect the JBoss Server in Standalone Mode to APM?
- What Can I Do If I Cannot Search for Logs Based on Trace IDs?
- How Do I Deploy APM Probes in CCE Containers?
- What Can I Do If the SSH Tunnel Process Is Abnormal?
- How Can I Do If No Topology or Data Is Displayed After the ICAgent and Java Probes Are Installed?
- Why Are Tomcat Thread Metrics Not Displayed on the JVM Monitoring Page?
- Why Is the Allocated Memory Greater Than the Preset Maximum Memory on the JVM Monitoring Page?
- How Do I Determine Whether an ICAgent Has Been Bound in CCE?
-
More Documents
- User Guide (ME-Abu Dhabi Region)
- API Reference (ME-Abu Dhabi Region)
-
User Guide (2.0) (Kuala Lumpur Region)
-
Service Overview
- What Is APM
- Functions
- Application Scenarios
- Basic Concepts
- Edition Differences
- Permissions Management
-
Metric Overview
- Metric Overview
- Exception
- Basic Monitoring
-
Databases
- C3P0 Connection Pool Monitoring
- Cassandra Monitoring
- ClickHouse Database
- DBCP Connection Pool Monitoring
- Druid Connection Pool Monitoring
- EsRestClient Monitoring
- GaussDB Database
- HBase Monitoring
- Hikari Connection Pool Monitoring
- Jetcd Monitoring
- MongoDB Monitoring
- MySQL Database
- ObsClient Monitoring
- Oracle Database
- PostgreSQL Database
- URLs
- External Calls
- Cache
- Agent Monitoring
- Tomcat Monitoring
- Message Queues
- RPC
- IoT
- Communication Protocol
- Privacy and Sensitive Information Protection Statement
- Data Collection
- Usage Restrictions
- Getting Started
-
User Guide
- Before You Start
- Application List
- CMDB Management
-
Application Metric Monitoring
- Overview
- Application Monitoring Details
-
Application Monitoring Configuration
- Configuration Details
- Configuring the MySQL Monitoring Item
- Configuring the HttpClient Monitoring Item
- Configuring the URL Monitoring Item
- Configuring the JavaMethod Monitoring Item
- Configuring the Druid Monitoring Item
- Configuring the ApacheHttpAsyncClient Monitoring Item
- Configuring the Redis Monitoring Item
- Configuring the Jedis Monitoring Item
- Configuring the HBase Monitoring Item
- Configuring the ApacheHttpClient Monitoring Item
- Configuring the Tomcat Monitoring Item
- Configuring the EsRestClient Monitoring Item
- Configuring the WebSocket Monitoring Item
- Configuring the KafkaProducer Monitoring Item
- Configuring the Hikari Monitoring Item
- Configuring the Exception Monitoring Item
- Configuring the Thread Monitoring Item
- Configuring the GC Monitoring Item
- Configuring the JVMInfo Monitoring Item
- Configuring the JVMMonitor Monitoring Item
- Configuring ProbeInfo Monitoring Item
- Monitoring Item Views
- Tracing
- Application Topology
- URL Tracing
- Resource Tag Management
- Managing Tags
- Alarm Management
- Agent Management
- Configuration Management
- System Management
- Permissions Management
- FAQs
- Change History
-
Service Overview
- General Reference
Copied.
Managing an E-Commerce Application
This section describes how to connect an e-commerce application to Application Performance Management (APM) for management. Information about the application:
- This is a Java application that is not deployed using JBoss. It can be deployed on the SUSE 12 SP2 VM in JRE 1.8 or later.
- The application contains five microservices, each of which contains an instance:
- apigw: API gateway, which is responsible for service authentication, request throttling, and filtering.
- product: Product management, including product query and purchase.
- user: User management, including user login and identity authentication during product purchase.
- dao: Data persistence layer, which is responsible for database request operations.
- MySQL database: Database.
The following describes how to connect the e-commerce application to APM for management.
Process
- Deploy the application on a Huawei Elastic Cloud Server (ECS). Note that APM supports Huawei ECSs only.
- Install the ICAgent. The ICAgent is a collection agent for collecting topology and tracing data in real time. You need to install the ICAgent on the ECS where the application is deployed.
- Modify application startup parameters to ensure that APM can monitor the application.
- Manage the application on APM, for example, view the application status on the topology page and view user experience on the transaction page.
Procedure
- Deploy the application on a Huawei ECS.
- Register a cloud account, top up the account, and purchase a Linux ECS. For details, see Logging In to an ECS.
To ensure application performance, select an ECS with at least 2 vCPU cores and 4 GB memory. Select the image for the SUSE 12 SP2 Operating System (OS), which is the only OS supported by the application.
- Log in to the ECS, create an application directory, and go to the directory, for example, mall.
- Set up the MySQL database and record the address, port number, username, and password for accessing the database. The demo supports automatic database creation.
- Download the application package to the mall directory and install it.
curl -l http://demos.obs.myhuaweicloud.com/demo_install.sh > demo_install.sh && bash demo_install.sh
NOTE:
During the installation, replace the database information according to the following procedure:
- Download and open the .sh file shown in the command.
- Download and open the demo_03.tar file in the .sh file.
- Open the .yaml file in the demo_03.tar file and modify the parameters under MySQL:
- host: address for setting up the database
- port: port
- user: username for accessing the database
- pass: password for accessing the database
- Save the settings and go to the next step.
- Register a cloud account, top up the account, and purchase a Linux ECS. For details, see Logging In to an ECS.
- Install the ICAgent. For details, see Initial Installation.
- Modify application startup parameters to ensure that the application can be monitored by APM.
Specifically, add the following parameters to the application startup script:
Parameter
Description
Example
-javaagent
JAR package that the collection probe depends on. The value is always /opt/oss/servicemgr/ICAgent/pinpoint/pinpoint-bootstrap.jar.
/opt/oss/servicemgr/ICAgent/pinpoint/pinpoint-bootstrap.jar
-Dapm_application
Application name, which can be customized.
vmall
-Dapm_tier
Application microservice name.
In this example, microservice names include apigw, product, user, and dao.
Application startup scripts:
Before the modification:
nohup java -Xms512m -Xmx2048m -jar /root/testdemo/ecommerce-persistence-service-0.0.1-SNAPSHOT.jar --spring.config.location=file:/root/testdemo/application_dao.yml > dao.log & nohup java -Xms512m -Xmx2048m -jar /root/testdemo/ecommerce-api-gateway-0.0.1-SNAPSHOT.jar --spring.config.location=file:/root/testdemo/application_api.yml > api.log & nohup java -Xms512m -Xmx2048m -jar /root/testdemo/ecommerce-user-service-0.0.1-SNAPSHOT.jar --spring.config.location=file:/root/testdemo/application_userservice.yml > user.log & nohup java -Xms512m -Xmx2048m -jar /root/testdemo/ecommerce-product-service-0.0.1-SNAPSHOT.jar --spring.config.location=file:/root/testdemo/application_prod.yml > prod.log & nohup java -Xms512m -Xmx2048m -jar /root/testdemo/cloud-simple-ui-1.0.0.jar --spring.config.location=file:/root/testdemo/ui.properties > ui.log &
After the modification (the modified information is shown in bold):
nohup java -javaagent:/opt/oss/servicemgr/ICAgent/pinpoint/pinpoint-bootstrap.jar -Dapm_application=vmall -Dapm_tier=vmall-dao-service -Xms512m -Xmx2048m -jar /root/testdemo/ecommerce-persistence-service-0.0.1-SNAPSHOT.jar --spring.config.location=file:/root/testdemo/application_dao.yml > dao.log & nohup java -javaagent:/opt/oss/servicemgr/ICAgent/pinpoint/pinpoint-bootstrap.jar -Dapm_application=vmall -Dapm_tier=vmall-apigw-service -Xms512m -Xmx2048m -jar /root/testdemo/ecommerce-api-gateway-0.0.1-SNAPSHOT.jar --spring.config.location=file:/root/testdemo/application_api.yml > api.log & nohup java -javaagent:/opt/oss/servicemgr/ICAgent/pinpoint/pinpoint-bootstrap.jar -Dapm_application=vmall -Dapm_tier=vmall-user-service -Xms512m -Xmx2048m -jar /root/testdemo/ecommerce-user-service-0.0.1-SNAPSHOT.jar --spring.config.location=file:/root/testdemo/application_userservice.yml > user.log & nohup java -javaagent:/opt/oss/servicemgr/ICAgent/pinpoint/pinpoint-bootstrap.jar -Dapm_application=vmall -Dapm_tier=vmall-product-service -Xms512m -Xmx2048m -jar /root/testdemo/ecommerce-product-service-0.0.1-SNAPSHOT.jar --spring.config.location=file:/root/testdemo/application_prod.yml > prod.log & nohup java -Xms512m -Xmx2048m -jar /root/testdemo/cloud-simple-ui-1.0.0.jar --spring.config.location=file:/root/testdemo/ui.properties > ui.log &
- Restart the application. After about three minutes, application data is displayed on the APM console.
You can monitor applications and locate application exceptions on the Dashboard and Topology pages of the APM console. For details, see APM User Guide.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot