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. You need to log in to the AOM 2.0 console to configure the proxy. For details, see Configuring a Proxy Area and Proxy.
- 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-xx-xx-x.obs.xx-xxx-4.xxxx.xxx/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-xx-xxxx-x.obs.xx-xxxx-x.xxxx.xxx -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 1 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 Addresses.
- 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