Splunk AppDynamics

How to configure Appdynamics with SpringBoot Application

CommunityUser
Splunk Employee
Splunk Employee

Hi Team, Please provide the steps to configure Appdynamic with SpringBoot application in local machine.

I got 15 days Apdynamicsportatl  free , 

I created springboot rest Appliciaton and it is workign fine

Login to Appdynamic portal and went to gettingstarted , downloaded java agent .  I couldnt find much steps in appdynamic documentation.

I need steps to further integration with SpringBoot Applicaiton. Please help on this.

Thanks,

Ashok

Labels (1)
0 Karma

Peter_Holditch
Builder

Ashok,

Your first step will be to introduce the AppDynamics java agent into the JVM running your Spring Boot application.

This process is described here.

Warm regards,
Peter

CommunityUser
Splunk Employee
Splunk Employee

I added the javaagent path in the VM argument of spring boot application in eclipse like below. But when I start my application, application gets start and I am not seeing any message related to java agent starting also I am not seeing any connection established from agent to controller on controller UI. Cloud you please help to identify the issue here.

-Djavaagent:D:/Applogs/appagent/javaagent.jar


@Peter.Holditch wrote:

Ashok,

Your first step will be to introduce the AppDynamics java agent into the JVM running your Spring Boot application.

This process is described here.

Warm regards,
Peter


0 Karma

Peter_Holditch
Builder

The correct option to load an agent into the JVM is "-javaagent", not "-Djavaagent"

I hope that helps.  If not, please post full detail of your command line.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

I tried that as well but didn't work. Below is the exact parameter I have added as VM arguments in eclipse. Agent is not getting start

image.jpeg

I have started the spring boot in command line using below command still didn't work. 

java -javaagent:D:/Applogs/appagent/javaagent.jar -jar loan-origination-0.0.1-SNAPSHOT.jar

Appreciate if your help to resolve this issue.

0 Karma

Peter_Holditch
Builder

Do you see any agent logs written under D:/Applogs/appagent/ver4.x.y.x/logs/<nodename>?

What happens if you run

"java -version -javaagent:D:/Applogs/appagent/javaagent.jar" 

from the command line?

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

after issuing the above command below is the result.

>java -javaagent:D:\Applogs\AppServerAgent-4.5.9.25648\javaagent.jar -version
Full Agent Registration Info Resolver using selfService [true]
Full Agent Registration Info Resolver using selfService [true]
Full Agent Registration Info Resolver using application name [LoanApplication]
Full Agent Registration Info Resolver using tier name [ApplicationTier]
Full Agent Registration Info Resolver using node name [SurajLocalNode]
Install Directory resolved to[D:\Applogs\AppServerAgent-4.5.9.25648]
Agent conf directory set to [D:\Applogs\AppServerAgent-4.5.9.25648\ver4.5.9.25648\conf]
[Thread-0] Tue Jun 11 17:29:00 IST 2019[DEBUG]: AgentInstallManager - Full Agent Registration Info Resolver is running
[Thread-0] Tue Jun 11 17:29:00 IST 2019[INFO]: AgentInstallManager - Full Agent Registration Info Resolver using selfService [true]
[Thread-0] Tue Jun 11 17:29:00 IST 2019[INFO]: AgentInstallManager - Full Agent Registration Info Resolver using selfService [true]
[Thread-0] Tue Jun 11 17:29:00 IST 2019[INFO]: AgentInstallManager - Full Agent Registration Info Resolver using application name [LoanApplication]
[Thread-0] Tue Jun 11 17:29:00 IST 2019[INFO]: AgentInstallManager - Full Agent Registration Info Resolver using tier name [ApplicationTier]
[Thread-0] Tue Jun 11 17:29:00 IST 2019[INFO]: AgentInstallManager - Full Agent Registration Info Resolver using node name [SurajLocalNode]
[Thread-0] Tue Jun 11 17:29:00 IST 2019[DEBUG]: AgentInstallManager - Full Agent Registration Info Resolver finished running
[Thread-0] Tue Jun 11 17:29:00 IST 2019[INFO]: AgentInstallManager - Agent runtime directory set to [D:\Applogs\AppServerAgent-4.5.9.25648\ver4.5.9.25648]
[Thread-0] Tue Jun 11 17:29:00 IST 2019[INFO]: AgentInstallManager - Agent node directory set to [SurajLocalNode]
Agent runtime conf directory set to D:\Applogs\AppServerAgent-4.5.9.25648\ver4.5.9.25648\conf
[Thread-0] Tue Jun 11 17:29:00 IST 2019[INFO]: AgentInstallManager - Agent runtime conf directory set to D:\Applogs\AppServerAgent-4.5.9.25648\ver4.5.9.25648\conf
[Thread-0] Tue Jun 11 17:29:00 IST 2019[INFO]: JavaAgent - Using Java Agent Version [Server Agent #4.5.9.25648 v4.5.9 GA compatible with 4.4.1.0 r24edb4ba5d4cc80793b2d5806ddf9cf8044e87b0 pull-requests/2158]
[Thread-0] Tue Jun 11 17:29:00 IST 2019[INFO]: JavaAgent - Running IBM Java Agent [No]
[Thread-0] Tue Jun 11 17:29:00 IST 2019[INFO]: JavaAgent - Java Agent Directory [D:\Applogs\AppServerAgent-4.5.9.25648\ver4.5.9.25648]
[Thread-0] Tue Jun 11 17:29:00 IST 2019[INFO]: JavaAgent - Java Agent AppAgent directory [D:\Applogs\AppServerAgent-4.5.9.25648\ver4.5.9.25648]
Agent logging directory set to [D:\Applogs\AppServerAgent-4.5.9.25648\ver4.5.9.25648\logs]
2019-06-11 17:29:00,793 INFO Log4j appears to be running in a Servlet environment, but there's no log4j-web module available. If you want better web container support, please add the log4j-web JAR to your web archive or server lib directory.
Running obfuscated agent
Started AppDynamics Java Agent Successfully.
java version "1.8.0_141"
Java(TM) SE Runtime Environment (build 1.8.0_141-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.141-b15, mixed mode)

Logs are created now but when I issue the below command I don't see agent started message

java -javaagent:D:\Applogs\AppServerAgent-4.5.9.25648\javaagent.jar -Dappdynamics.http.proxyHost=10.74.91.103 -Dappdynamics.http.proxyPort=80 -jar loan-origination-0.0.1-SNAPSHOT.jar

0 Karma

Peter_Holditch
Builder

OK, so the good news is that we have established that your agent installation is fine.

Does your spring boot application work fine when the agent is loaded via the command line?

What does the "jps -v" command show when it is running?

It might be easier to troubleshoot this via a support ticket if we don't uncover anything via the above suggestions.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

I don't see any log file generated under D:/Applogs/appagent/ver4.x.y.x/logs/

When I did java -version -javaagent:D:/Applogs/appagent/javaagent.jar" it printed below,

java -version D:\Applogs\AppServerAgent-4.5.9.25648\javaagent.jar
openjdk version "1.8.0_202"
OpenJDK Runtime Environment (build 1.8.0_202-b08)
Eclipse OpenJ9 VM (build openj9-0.12.1, JRE 1.8.0 Windows 10 amd64-64-Bit Compressed References 20190205_265 (JIT enabled, AOT enabled)
OpenJ9 - 90dd8cb40
OMR - d2f4534b
JCL - d002501a90 based on jdk8u202-b08)

0 Karma

Peter_Holditch
Builder

Sorry, my mistake, I reversed the options.

What happens when you run:

"java -javaagent:D:/Applogs/appagent/javaagent.jar -version"

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

was looking for it too. thanks @Peter.Holditch

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 ...