Connecting On-premises Services to APM
Background
You cannot connect on-premises services to APM using Direct Connect. To access APM, configure a proxy.
Configuration Method
If the network between your host and APM is disconnected, configure a proxy.
- Configure a proxy.
- Log in to the AOM 2.0 console.
- On the menu bar, choose Collection Management.
- In the navigation tree on the left, choose UniAgent > Proxy Areas. The Proxy Areas page is displayed.
- Click Add Proxy and set related parameters.
Figure 1 Adding a proxy
Table 1 Parameters for adding a proxy Parameter
Description
Example Value
Proxy Area
Select the created proxy area.
region
Host
Select a host where the UniAgent has been installed.
-
Proxy IP Address
Set the IP address of the proxy.
-
Port
Enter a port number, which cannot be greater than 65535.
-
- Click OK.
- Configure the JavaAgent.
- Download the JavaAgent package to any directory of the host to be connected to APM.
curl -O https://xxx/apm-javaagent-x.x.x.tar Download Agent 2.4.1: curl -k https://apm2-javaagent-cn-north-4.obs.cn-north-4.myhuaweicloud.com/apm_agent_install2.sh -o apm_agent_install.sh && bash apm_agent_install.sh -ak {APM_AK} -sk {APM_SK} -masteraddress https://xx.xx.xx.xx:41333 -obsaddress https://apm2-javaagent-cn-north-4.obs.cn-north-4.myhuaweicloud.com -version 2.4.1; history -cw; history –r
- Run the tar command to decompress the JavaAgent package.
Example command:
tar -xvf apm-javaagent-x.x.x.tar
- Modify the apm.config file in the JavaAgent package. Add apm.proxy to the configuration file, as shown in the following figure.
Figure 2 Configuration file
- Agents of 2.4.1 and later support access through a proxy. Format: apm.proxy=ip:port (Obtain ip:port from the AOM console.)
- To obtain an AK/SK, see Access Keys.
- To obtain the master.address, see Access Address (master.address).
- Download the JavaAgent package to any directory of the host to be connected to APM.
- Restart the application.
- Modify the startup script of the Java process.
Add the path of the apm-javaagent.jar package and the component name of the Java process to the end of the Java command in the service startup script.
Example of adding -javaagent parameters:
java -javaagent:/xxx/apm-javaagent/apm-javaagent.jar=appName={appName}
- Restart the application.
- Modify the startup script of the Java process.
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