Adding APM Insight Java agent in a Kubernetes environment

Adding 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. Download the latest APM Insight Java agent (apminsight-javaagent.zip) file.
  2. Extract the ZIP file and locate the agent's JAR and configuration files.
  3. Open the apminsight.conf file in any text editor and include the license.key, apm.host, application.name, and proxy details(if any).

Adding the APM Insight Java agent via a Docker container

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

Refer to this help page for detailed instructions.                                                                                                                                                          
  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 tab.

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.

Refer to this KB article for detailed instructions and examples.                                                                                                         
  1. Create a secret for the APMInsight 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 docker 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.

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 APMInsight license key in your application namespace.
  4. Include the environment variables (S247_LICENSE_KEY and JAVA_TOOL_OPTIONS) in the application deployment YAML file.


                  New to ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • How to add an APM Insight Java agent in Kubernetes via InitContainers?

                        Step 1. Create a secret to access the APM Insight license key in your application namespace: kubectl create secret generic app-secret --from-literal=s247licensekey='your_APMInsight_license_key' -n petclinic The license key can be obtained from the ...
                      • 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 ...
                      • How to rename an existing APM - Java agent application's monitor?

                        In Applications Manager's APM(Application Performance Monitoring) doesn't support renaming applications/monitors from the web client. However, the application name of an existing application instance can be renamed in the `apminsight.conf` file and ...
                      • Uninstrumented Block of Code - APM Insight

                        In the traces tab --> Slowest Method Calls and Count we show if you find Un-instrumented block of code the reason is as follows: Basically, What is un-instrumented block of code in APM Insight? By default, APM Insight agent monitors known frameworks ...
                      • APM Insight Java agent setup in K8s via Persistent Volumes

                        Prerequisites 1. A persistent volume (with a capacity of 100mb). 2. The persistent volume mounted on all deployment pods (via persistent volume claim). 3. The Applications Manager APM Insight Java agent zip file was downloaded, moved, and extracted ...