- 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.
Connecting a Deployment Application to APM
Deployment is a workload that does not store any data or status. If you have deployed a Deployment application using Cloud Container Engine (CCE) or open-source Kubernetes, you can execute the configuration script to connect the application to APM and view its data on the topology and transaction pages.
Prerequisites
- You have connected an Elastic Cloud Server (ECS) to a cluster by running the kubectl command. For details, see Connecting to a Cluster Using kubectl.
- You have deployed an application using CCE or open-source Kubernetes.
Procedure
Step 1: Subscribe to APM
Step 2: Install the ICAgent
- If the ICAgent is bound to CCE, skip this step.
- Obtain an Access Key ID/Secret Access Key (AK/SK).
- Log in to the APM console.
- In the navigation pane, choose Agent > Management.
- Click Install ICAgent. On the page that is displayed, set Host to HUAWEI CLOUD host and OS to Linux.
- Select the Obtain AK/SK installation mode, enter the obtained AK/SK in the text box to generate the ICAgent installation command, and click Copy Command.
NOTE:
Ensure that the AK/SK are correct. Otherwise, the ICAgent cannot be installed.
- Remotely log in to the ECS server as the root user and run the preceding command to install the ICAgent.
When the message "ICAgent install success" is displayed, the ICAgent is successfully installed in the /opt/oss/servicemgr/ directory.
(Optional) Step 3: Modify Permissions
If you start the program as a non-root user, run the following commands to modify the permissions on the probe file and output directory before enabling application monitoring:
chmod -R 777 /opt/oss/servicemgr/ICAgent/pinpoint/ mkdir -p /opt/apm-container chmod -R 777 /opt/apm-container
Step 4: Enable Application Monitoring
- On the ECS or CCE, configure the startup script of the Deployment. Specifically, add the following information in bold to the YAML file.
Run the following command to edit the YAML file:
vi xxx.yaml
xxx indicates the name of the description file customized when you create the Deployment application. The following provides an example. For more information about deployments, see Kubernetes documents.kind: Deployment apiVersion: apps/v1 metadata: name: user-service namespace: default selfLink: /apis/apps/v1/namespaces/default/deployments/user-service uid: b231788d-9abd-11e8-80a5-fa163e3a2cc7 resourceVersion: '50972062' generation: 13 creationTimestamp: '2018-08-08T03:46:56Z' labels: app: user-service stack-name: auto-test annotations: deployment.kubernetes.io/revision: '5' description: '' enable: true spec: replicas: 1 selector: matchLabels: app: user-service template: metadata: creationTimestamp: null labels: app: user-service enable: true spec: #External mount directory of the container, including the data output path and Java probe package path. volumes: - name: paas-apm hostPath: path: /opt/apm-container - name: pinpoint-pkg hostPath: path: /opt/oss/servicemgr/ICAgent/pinpoint containers: - name: user-service image: '100.125.0.198:20202/zhyyy/user-service:v1' ports: - containerPort: 8080 protocol: TCP env: - name: PAAS_APP_NAME # Workload name (service name). value: user-service - name: PAAS_NAMESPACE #CCE cluster namespace. For a non-CCE cluster, this parameter is left blank. value: default - name: PAAS_PROJECT_ID #Tenant's project ID. value: d698369a975645bfb35f8437d11c5a12 - name: PAAS_CLUSTER_ID #CCE cluster ID, which can be queried by pressing F12 on the CCE console. For a non-CCE cluster, this parameter is left blank. value: 89b49857-5433-11e8-941c-0255ac101f3e - name: PAAS_POD_ID valueFrom: fieldRef: fieldPath: metadata.uid - name: PAAS_MONITORING_GROUP # Application name (monitoring group). You are advised to set the same application name for the services that fulfill the same function. value: shoppingmall - name: JAVA_TOOL_OPTIONS value: -javaagent:/opt/oss/servicemgr/ICAgent/pinpoint/pinpoint-bootstrap.jar -Dapm_container=true resources: {} #Internal mount directory of the container, including the data output path and Java probe package path. volumeMounts: - name: paas-apm mountPath: /paas-apm/collectors/pinpoint - name: pinpoint-pkg mountPath: /opt/oss/servicemgr/ICAgent/pinpoint terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: Always restartPolicy: Always terminationGracePeriodSeconds: 30 dnsPolicy: ClusterFirst securityContext: {} schedulerName: default-scheduler strategy: type: RollingUpdate rollingUpdate: maxUnavailable: 0 maxSurge: 1 revisionHistoryLimit: 10 progressDeadlineSeconds: 600 status: observedGeneration: 13 replicas: 1 updatedReplicas: 1 readyReplicas: 1 availableReplicas: 1 conditions: - type: Progressing status: 'True' lastUpdateTime: '2018-09-02T13:25:46Z' lastTransitionTime: '2018-08-08T03:46:56Z' reason: NewReplicaSetAvailable message: ReplicaSet "user-service-f584f46b7" has successfully progressed. - type: Available status: 'True' lastUpdateTime: '2018-12-21T11:01:33Z' lastTransitionTime: '2018-12-21T11:01:33Z' reason: MinimumReplicasAvailable message: Deployment has minimum availability.
- Restart the application using the modified script, and enable application performance monitoring.
Step 5: Manage the Application on APM
Three minutes after the application is started, its data will be displayed on the APM console. You can log in to the APM console and optimize application performance through topology and tracing. 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