The Java agent collects detailed performance metrics about applications and the computing environment as transactions are executed. The Java agent collects this information from applications and resources running on Java Virtual Machines (JVMs) and sends the information to the SixthSense platform. It then processes and stores the data for real-time and historical reporting.
For java application monitoring,
- Deploy agents to monitor the performance and availability of application servers.
- Test, adjust, and optimize monitoring of application components.
- The agent uses some of the application server Java heap memory to store collected data.
- For a highly utilized heap java application, increase the heap allocation on the installation of the Java agent.
- If there are large numbers of transaction traces, increase the JVM heap size.
- SixthSense Java Agent. See Downloading the agent.
- URL/IP of the SixthSense collector (your tenant URL which will be provided by Customer Support).
- SIXTHSENSE_TOKEN - For accessing the token, see Accessing your Access Token under Getting started with the Observability Portal.
Note: The agent uses internet to communicate with backend address. For more information, see Enabling proxy.
Agent download requisites
|To download the agent, an access token is required from Customer Support.
|SixthSense Agent Version
To monitor any Java application you need valid licenses and access to download the SixthSense Java Agent.
Downloading the agent
Prerequisites for downloading the agent
- Private Token from the onboarding team.
- Link to download a specific version.
To download the agent, perform the following procedure:
- Ensure there is ingress from the internet/ from the SixthSense enabled.
- Download the agent using curl. If the agent is downloaded to Docker, install curl before proceeding.
Set up the agent
Configure the application server that needs instrumenting to include the path to the agent primary .jar file (i.e. sixthsense-agent.jar). Configure the path by editing the application server startup script and then restart the application server. When the application server restarts, the Java Agent instruments the classes discovered for default components of the JVM and application environment. The specific steps that are involved depend on the application server.
- Unzip the downloaded Agent. See Downloading the agent.
- Navigate to agent.config file i.e. Agent folder/SixthSense/Config/agent.config file.
Note: Ensure that you provide same permissions (user and group) to the agent folder with which the application is running. Also, copy the agent folder in the application's parent directory.
Adding application information in the agent.config file
- Add application name and team_id.
- Set “agent.service_name” to identify your application name and the team id to identify which team your application belongs to i.e. “agent.team_id” in the dashboard.
For example, assume USER_APP is your application name. Navigate to agent.config file i.e. Agent folder/SixthSense/Config/agent.config file and update.
For enabling connectivity to OneCloud collector, Set SW_AGENT_FORCE_TLS as false in the agent.config file.
- Get Access Token from the SixthSense portal. See Accessing your Access Token under Getting started with the Observability Portal.
Update the backend collector URL
- Set collector.backend_service with Backend Collector URL.
- Customer Support will provide the Backend Collector URL
Instrumenting an application
Note: The agent uses internet to send data to the backend service. If direct internet access is not enabled, please pass a proxy through which it can communicate to our backend address.
Enable proxy using any of the following two methods:
- Set proxy at system/container level.
a. Windows Servers: add environment variable in system level variables for HTTP_PROXY, GRPC_PROXY_EXP
b. Linux Servers:
- Pass Proxy to JVM by adding proxy in Java options.
Add -javaagent flag
After completing agent configuration, while starting your application, add the JVM flag -javaagent:Path to sixthsense-agent.jar under the startup/entrypoint application file.
Example to run the Java Agent for a standalone application
Execute the Java Agent command along with your Jar File. For example, if your application jar is named as "java_backend", use the following command.
Note: For Windows based applications, if the arguments to the application are being passed from windows registry service, then you must pass the agent in those arguments in order to integrate the agent.
Integrating agent in a docker environment
- Download the SixthSense Agent. See, Downloading the agent.
- After downloading the agent follow the procedure in Adding application information in the agent.config file.
- Setup the agent configurations as mentioned in Instrumenting an application.
- Integrate the agent with the Dockerfile.
Add the following commands:
- Build your Docker images.
- Run your application with the Docker image created.
- On the dashboard, you will see the application name defined above.
Example for Docker
To build the docker image, variables are passed as build arguments i.e AGENT_VERSION and TOKEN.