Splunk AppDynamics

Baking java and machine agents into Docker images

Adam_Reynolds
New Member

Hi

We are implementing some build processes in which docker images will be an output of a build pipeline.

We will need to be able to bake AppD agents into the docker images.

Are you able to provide a Docker file receipe or direct me to a resource for information on possible approaches ?

Thanks in advance,

Labels (1)
Tags (1)
0 Karma

Brian_Wheeldon
Contributor

Conceptually, the Java agent is just another asset of your application to deploy and whatever orchestration you're using for your application could be used to put the Java agent into your base image or add it to the containers dynamically. 

The machine agent should NOT be deployed into the Docker images, but rather should be installed on the host where your containers run. The machine agent will automatically collect container metrics in an upcoming release, but in the meantime you can use the Docker Extension from the Community: https://www.appdynamics.com/community/exchange/extension/docker-monitoring-extension/

Regards,

Brian Wheeldon

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

I have a requirement of keeing Appdynamics Java Agent inside the docker image and want application inside docker image to pol the appdynamics controller.

Have put the agaent in docker image and the same is getting show inside container also when i create and execute container with that image ,But my application is not getting registered with appdynamics controller.

I'm giving the path of javaaganet.jar in "ENTRYPOINT" of the docker file. liie below

ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -javaagent:/usr/local/appagent/javaagent.jar -jar /app.jar" ], 

I'm expecting once my container is up in entry point i will provide this jar and my application will register with the controller , but the same is failing.

Do have any suggestion for this , pls

0 Karma

Peter_Holditch
Builder

The basic approach you describe should be fine, but you need to set the details the agent will use to connect to the controller.

If you have not somehow editted these into the controller-info.xml in your dockerfile, you will need to pass additional system properties or environment variables to your container.

To verify that this is indeed the issue, you can look in the agent log file within the container.

Also, note that node name need to be unique within a tier.  You may want to look at auto node naming.

0 Karma
Get Updates on the Splunk Community!

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...

AppDynamics is now part of Splunk Ideas

Hello Splunkers, We have exciting news for you! AppDynamics has been added to the Splunk Ideas Portal. Which ...

Advanced Splunk Data Management Strategies

Join us on Wednesday, May 14, 2025, at 11 AM PDT / 2 PM EDT for an exclusive Tech Talk that delves into ...