Help Docs

Adding the APM Insight Java agent in a Kubernetes environment

There are three methods for installing the APM Insight Java agent in a Kubernetes environment.

Prerequisites

  1. Log in to Site24x7.
  2. Go to APM > APM Insight > Applications and click the Java icon.
  3. Click Download to obtain the APM Insight Java agent ZIP file (apminsight-javaagent.zip).
  4. Extract the ZIP file and locate the agent's JAR and configuration files.
  5. Open the apminsight.conf file in any text editor and include the license.key, application.name, and proxy details.

Adding the APM Insight Java agent via a Docker container

Follow the steps below to install the Java agent in a Docker container:

Note

Refer to this help page for detailed instructions with screenshots.

  1. Place all the agent files in the same local directory where your Dockerfile is located.
  2. Open the Dockerfile with any text editor, and copy all the APM Insight Java agent files to a directory inside the target container.
  3. Add -javaagent:[absolute_path_of_agent_jar]/apminsight-javaagent.jar (Java argument) to the startup command.
  4. Use the updated Dockerfile to create your container image.
  5. Once the image is ready, start your application by spawning containers using the Docker image you created.
  6. Once the application is up and receiving requests, view the monitor under APM > APM Insight > Applications.

Adding the APM Insight Java agent in Kubernetes via Init Containers

These steps guide you through the process of integrating the APM Insight Java agent into your Kubernetes deployment using Init Containers.

Note

Refer to this KB article for detailed instructions and examples.

  1. Create a secret for the Site24x7 license key in your application namespace.
  2. Create an empty volume that will be used to copy the agent files during the InitContainers process.
  3. Include the InitContainers command in your Helm chart or deployment YAML file to copy agent files from the Site24x7 image to your volume.
  4. Mount the volume created in Step 2 into your application container.
  5. Include the environment variables (S247_LICENSE_KEY and JAVA_TOOL_OPTIONS) in the application deployment YAML file.

Adding APM Insight Java agent in Kubernetes via Persistent Volumes

This explains how to set up the APM Insight Java agent for applications running in Kubernetes using Persistent Volumes.

Note

Refer to this KB article for prerequisites and detailed instructions.

  1. Create a Persistent Volume and copy all agent files into it.
  2. Mount the volume into the application container.
  3. Create a secret for the Site24x7 license key in your application namespace.
  4. Include the environment variables (S247_LICENSE_KEY and JAVA_TOOL_OPTIONS) in the application deployment YAML file.

 

Related articles

How to install various APM Insight agents in a Docker container
Java | .NET | PHP | Node.js | Python

How to install various APM Insight agents in a Kubernetes environment
.NET | PHP | Node.js | Python

Was this document helpful?

Shortlink has been copied!