Specifying APM Settings
APM monitors and manages the performance and faults of cloud applications in real time. It helps O&M personnel spot performance issues and pinpoint faults swiftly, maintaining optimal user experience. To monitor Java workloads deployed in a CCE Autopilot cluster, simply enable APM probes. There is no need to modify code. The APM probes help identify errors and slow APIs, reproduce calling parameters, and detect system bottlenecks. This greatly improves the efficiency of diagnosing online problems. Figure 1 illustrates the operational process of an APM probe. This section describes how to specify APM settings for a workload on the console.
Prerequisites
- You have enabled the APM service. If you have not enabled this service, go to the APM console and enable it as prompted.
- You have created a VPC endpoint for APM. If you have not created an endpoint, create one by following the instructions on the APM console.
Constraints
- If a VPC endpoint for APM is deleted, data will fail to be uploaded to APM. If you create this endpoint again, the metrics will not resume uploading to APM automatically. In this case, you need to restart the application.
- Deleting a workload that uses APM will not delete the endpoint. To delete the endpoint, go to the network console.
- APM settings can only be specified for Deployments and StatefulSets.
Billing
You may be billed for APM probes. For details, see APM Billing.
Procedure
You can specify APM settings for a workload either during or after the creation.
- Log in to the CCE console.
- Click the cluster name to go to the cluster console, choose Workloads in the navigation pane, and then click Create Workload in the upper right corner.
- In the Advanced Settings area, click APM Settings and enable a probe. By default, the probe is disabled. You can select APM 2.0.
After an APM probe is enabled, CCE transmits Java application data to the APM service for more precise fault location and analysis. Additionally, CCE:
- Creates an init container named init-javaagent for APM 2.0 to initialize the probe and allocates 0.25 vCPUs and 250 MiB of memory to the init container.
- Adds the following environment variables to all service containers of the workload: PAAS_MONITORING_GROUP, JAVA_TOOL_OPTIONS, PAAS_CLUSTER_ID, and APM_ACCESS_ADDRESS.
- Mounts a local storage volume named paas-apm2 to all service containers of the workload.
- Configure probe-related parameters. Figure 2 APM 2.0
Table 1 APM 2.0 probe parameters Parameter
Example Value
Description
APM Endpoint
Configured
To access APM in a CCE Autopilot cluster, you need to create a VPC endpoint for APM to connect to the VPC. For details about the VPC endpoint price, see VPC Endpoint Pricing.
Probe Version
2.5.2
Select a probe version based on the following considerations:
The latest probe version does not necessarily correspond to the most recent version. For details about the probe capabilities of different versions, see JavaAgent Updates.
Probe Upgrade Policy
Auto upgrade upon restart
Select an option to define how a probe will be upgraded. It defaults to Auto upgrade upon restart. Options include:
- Auto upgrade upon restart: The probe image is always re-downloaded when the workload restarts.
- Manual upgrade upon restart: If the probe image is available locally, the local image will be used. Otherwise, the image will be re-downloaded.
APM Environment
/
(Optional) Enter an environment name. APM will create an environment for the workload. APM environments help distinguish performance data across different deployment phases, such as production and testing, for classified management and precise analysis of application performance.
APM App
default
Select an existing application from APM. APM applications help organize monitoring data by function module, allowing unified management and analysis.
Sub-app
/
(Optional) Enter an APM sub-application name for more refined management.
If the sub-application already exists in APM, the workload will be associated with the sub-application. Otherwise, CCE will create the specified sub-application.
Access Key
AK: xxx
SK: xxx
Enter the AK and SK of APM, which are used to obtain the permissions to report data. CCE will retrieve this pair of AK and SK.
- Configure other parameters and click Create Workload. After the workload status changes to Running, wait for about 3 minutes. The application data will be displayed on the APM console. Then, log in to APM and optimize application performance through topologies and traces. For details, see Application Metric Monitoring.
Take the following steps to enable an APM probe for an existing Java workload to monitor the workload.
- Log in to the CCE console.
- Click the cluster name to go to the cluster console, choose Workloads in the navigation pane, and select the workload type on the right. Click the name of the target workload.
- On the workload details page, click the APM Settings tab. In the Probe area, click Edit on the right.
- By default, the probe is disabled. You can select APM 2.0.
After an APM probe is enabled, CCE transmits Java application data to the APM service for more precise fault location and analysis. Additionally, CCE:
- Creates an init container named init-javaagent for APM 2.0 to initialize the probe and allocates 0.25 vCPUs and 250 MiB of memory to the init container.
- Adds the following environment variables to all service containers of the workload: PAAS_MONITORING_GROUP, JAVA_TOOL_OPTIONS, PAAS_CLUSTER_ID, and APM_ACCESS_ADDRESS.
- Mounts a local storage volume named paas-apm2 to all service containers of the workload.
- Configure probe-related parameters. Figure 3 APM 2.0
Table 2 APM 2.0 probe parameters Parameter
Example Value
Description
APM Endpoint
Configured
To access APM in a CCE Autopilot cluster, you need to create a VPC endpoint for APM to connect to the VPC. For details about the VPC endpoint price, see VPC Endpoint Pricing.
Probe Version
2.5.2
Select a probe version based on the following considerations:
The latest probe version does not necessarily correspond to the most recent version. For details about the probe capabilities of different versions, see JavaAgent Updates.
Probe Upgrade Policy
Auto upgrade upon restart
Select an option to define how a probe will be upgraded. It defaults to Auto upgrade upon restart. Options include:
- Auto upgrade upon restart: The probe image is always re-downloaded when the workload restarts.
- Manual upgrade upon restart: If the probe image is available locally, the local image will be used. Otherwise, the image will be re-downloaded.
APM Environment
/
(Optional) Enter an environment name. APM will create an environment for the workload. APM environments help distinguish performance data across different deployment phases, such as production and testing, for classified management and precise analysis of application performance.
APM App
default
Select an existing application from APM. APM applications help organize monitoring data by function module, allowing unified management and analysis.
Sub-app
/
(Optional) Enter an APM sub-application name for more refined management.
If the sub-application already exists in APM, the workload will be associated with the sub-application. Otherwise, CCE will create the specified sub-application.
Access Key
AK: xxx
SK: xxx
Enter the AK and SK of APM, which are used to obtain the permissions to report data. CCE will retrieve this pair of AK and SK.
- Click OK in the lower right corner. After the workload status changes to Running, wait for about 3 minutes. The application data will be displayed on the APM console. Now you can log in to the APM console and optimize application performance through topologies and tracing. For details, see Application Metric Monitoring.
Modifying APM Settings
After enabling an APM probe, you can modify the probe settings.
- Log in to the CCE console.
- Click the cluster name to go to the cluster console, choose Workloads in the navigation pane, and select the workload type on the right. Click the name of the target workload.
- On the workload details page, click the APM Settings tab, locate the target probe, and click Edit on the right.
- Modify the APM probe parameters as needed.
Table 3 APM 2.0 probe parameters Parameter
Example Value
Description
APM Endpoint
Configured
To access APM in a CCE Autopilot cluster, you need to create a VPC endpoint for APM to connect to the VPC. For details about the VPC endpoint price, see VPC Endpoint Pricing.
Probe Version
2.5.2
Select a probe version based on the following considerations:
The latest probe version does not necessarily correspond to the most recent version. For details about the probe capabilities of different versions, see JavaAgent Updates.
Probe Upgrade Policy
Auto upgrade upon restart
Select an option to define how a probe will be upgraded. It defaults to Auto upgrade upon restart. Options include:
- Auto upgrade upon restart: The probe image is always re-downloaded when the workload restarts.
- Manual upgrade upon restart: If the probe image is available locally, the local image will be used. Otherwise, the image will be re-downloaded.
APM Environment
/
(Optional) Enter an environment name. APM will create an environment for the workload. APM environments help distinguish performance data across different deployment phases, such as production and testing, for classified management and precise analysis of application performance.
APM App
default
Select an existing application from APM. APM applications help organize monitoring data by function module, allowing unified management and analysis.
Sub-app
/
(Optional) Enter an APM sub-application name for more refined management.
If the sub-application already exists in APM, the workload will be associated with the sub-application. Otherwise, CCE will create the specified sub-application.
Access Key
AK: xxx
SK: xxx
Enter the AK and SK of APM, which are used to obtain the permissions to report data. CCE will retrieve this pair of AK and SK.
- Click OK in the lower right corner. After the workload status changes to Running, APM settings will be updated, which takes about 3 minutes.
Helpful Links
- To learn more about workload parameters, see Creating a Workload.
- After a workload is created, you can upgrade it, edit its YAML file, and view its logs. For details, see Managing Workloads.
- If the workload fails to be created, rectify the fault by referring to Workload Exception Troubleshooting.
- After configuring APM probes for workloads, you can monitor and manage data on APM and optimize the application performance through topologies and tracing. For details, see Before You Start.
What is your overall rating for this page?
Thank 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
