Steps to Monitor Multiple Java applications running on a single server
Monitoring Multiple Java Applications on a Single Server:
Refer this
document to find your java agent version
Note: Ensure that agent's -D and -javaagent argument values — including the agent directory path and application name — should not be enclosed in double quotes.
APMInsight Java Agent 7.0 and Above
Approach 1: Add the Java Agent Argument in Each Application Startup Script (Recommended)
1.
Download and extract the
APMInsight Java agent and configure the host and license key of the Applications Manager Server (refer to the documentation for details) and add the following argument to each Java application startup file:
-javaagent:<agent_extracted_directory>/apminsight-javaagent.jar -Dapminsight.application.name=<application_name> -Dapminsight.agent.server.port=<application_running_port>
Example:
For windows,
-javaagent:D:\me\apminsight-javaagent\apminsight-javaagent.jar -Dapminsight.application.name=Ecommerce Application -Dapminsight.agent.server.port=8185
For Linux,
-javaagent:/opt/apminsight-javaagent/apminsight-javaagent.jar -Dapminsight.application.name=Ecommerce Application -Dapminsight.agent.server.port=8185
Note: The above argument must be added to each application's startup file with the corresponding application name and running port.
2. Restart your application server to start monitoring your application.
Approach 2: Add the Java Agent Argument in the Environment Variables of the Machine
Note: Adding the Java agent argument at the environment level will include all Java processes created on the machine as monitors in the Applications Manager.
1.
Download the APMInsight Java agent and configure the host and license key of the Applications Manager Server (refer to the documentation for details).
2. Remove the default key and values from the apminsight.conf file:
application.name=My Application
agent.server.port=8080
3. Add the following key and value in the apminsight.conf file:
auto.appname.enabled=true
4. Configure the following key and value in the environment variables of the machine:
JAVA_TOOL_OPTIONS=-javaagent:<agent_extracted_directory>/apminsight-javaagent.jar
Example:
For windows,
JAVA_TOOL_OPTIONS=-javaagent:D:\me\apminsight-javaagent\apminsight-javaagent.jar
For Linux,
JAVA_TOOL_OPTIONS=-javaagent:/opt/apminsight-javaagent/apminsight-javaagent.jar
5. Start the Java application in a new terminal session.
APMInsight Java Agent 6.8 and Below
1.
Download and extract the APMInsight Java agent. Delete the apminsight.conf file present in the extracted directory. Then, add the following argument to each application's startup file:
-javaagent:<agent_extracted_directory>/apminsight-javaagent.jar -Dapminsight.application.name=<application_name> -Dapminsight.agent.server.port=<application_running_port> -Dapminsight.home=<agent_extracted_directory>/<application_name> -Dapminsight.license.key=<your_apminsight_license_key> -Dapminsight.apm.host=<applications_manager_url>
2. Restart your application server to start monitoring your application.
Example:
-javaagent:
D:/me/apminsight-javaagent/apminsight-javaagent.jar -Dapminsight.application.name=
Ecommerce application -Dapminsight.agent.server.port=
8185 -Dapminsight.home=
D:/me/apminsight-javaagent/
Ecommerce application -Dapminsight.license.key=
APMI_c6347e3652d5aae29d012a4a04f2f012572b183ae7b0845661dca95cb762c9d2 -Dapminsight.apm.host=
https://apm-prod-server:8443
Key Definitions:
- agent_extracted_directory: Directory where the agent is extracted.
- application_name: Name of your application.
- application_running_port: Running port of your application.
- your_apminsight_license_key: License key of the Applications Manager Server.
- applications_manager_url: Applications Manager Server URL.
New to ADSelfService Plus?
Related Articles
Self monitor Applications Manager using Real User Monitoring
We can monitor the Applications Manager using Real User Monitoring with a Java Script injection and this can be used to measure the Applications Manager's performance continuously. All you need is to install and setup the Real User Monitoring (RUM) ...
Real User Monitor (RUM) - Troubleshooting
If the monitor has not polled data for a long time, follow the below steps for troubleshooting. Step 1: Check the RUM Agent configuration Real User Monitor requires the RUM Agent to be installed and mapped to the Applications Manager. Refer this help ...
Self monitor Applications Manager using APM Insight Java Agent
Applications Manager is built with Java, hence we can monitor it using APM Insight Java Agent to measure it's performance continuously, which can be very much useful. Setting up APM Insight Java Agent Follow the below steps to download and set up the ...
Adding APM Insight Java agent in a Kubernetes environment
There are three methods for installing the APM Insight Java agent in a Kubernetes environment: Using Dockerfile Using InitContainers Using Persistent Volumes Prerequisites Download the latest APM Insight Java agent ZIP file. Extract the ZIP file and ...
Mail Server Monitor - Troubleshooting
Common Mail Server Monitor Errors and Troubleshooting Guide 1. Unknown Host Error Description: This error occurs when the mail client cannot resolve the hostname of the mail server to an IP address. The issue typically arises from DNS resolution ...