cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to install java agent on Ubuntu machine

Kiran.K
Explorer

Hi,

I am new to AppDynamics and I am using 15 days trial version SAAS. 

I am trying to install a java agent on the Ubuntu machine. I have downloaded the java configuration file from the wizard.

 

I configured the controller-info.xml file accordingly. But, to load the java agent in JVM, could you please guide where I need to add the below one? (location)

 

-javaagent:<agent_home>/javaagent.jar 

 

Also, I am using tomcat7, could you please guild where should I add these arguments.  

export CATALINA_OPTS="$CATALINA_OPTS -javaagent:<agent_home>/javaagent.jar"

 

Once these two are configured, automatically the agents gets connected to the controller? 

 

Thanks,

Kiran

 

^ Posted edited by @Ryan.Paredez to improve the title of the post. 

 
 

 

1 REPLY 1

Mario.Morelli
Architect

Hi Kiran

 

Lets go through the steps

 

Firstly ensure that the user that you are starting the tomcat process as, has permissions to read/write to the AppDynamics Agent directory:) Otherwise allow access.

 

1. Connectivity

Have you confirmed that you can access the Trial AppDynamics instance from the sevrer where you are running your tomcat instance?

 

You can use telnet command to verify that you can connect to the SaaS hostname

e.g

telnet myappdtrial.saas.appdynamics.com 443

 

2. Agent Configuration

 

Have you set the following values according to your controller

controller-host

controller-port

controller-ssl-enabled

application-name

tier-name

node-name

account-name

access-key

 

3. Tomcat Configuration

in the Tomcat bin directory e.g

/apache-tomcat-7.0.105/bin

 

Open and edit the catalina.sh file

Add this line into the top of the file, with the <agent_home> variable to be changed to where you unzipped your Appdynamics Java agent

export CATALINA_OPTS="$CATALINA_OPTS -javaagent:<agent_home>/javaagent.jar"

 

Then just stop and start the Tomcat service and AppDynamics should be instrumented

 

 

4. Validation

run a command e.g

ps aux | grep tomcat

 

Check if you can see the AppDynamics startup arguments are part of the Tomcat process

 

Check the AppDynamics logs directory, if it started with the Tomcat process, it should have created a folder with the "node name" you gave in the logs directory

 

Then validate that you can see the application in AppDynamics

 



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Learn more about me in the Community Member Spotlight Q & A