AppD Archive

Monitor Plain Java Process

CommunityUser
Splunk Employee
Splunk Employee

As Far as i remeber , there are 2 agents ,machine and app.Now i have a enviroment where i give developer a plain old linux box where they can run their java classes ( i mean using java appName). 

Now these classes do all sort of things , connects to DB , jms , do  alot things. I need to monitor thses java process.

Any Options?

0 Karma

Arun_Dasetty
Super Champion

Hi Jagadesh,

We understood that you monitor java application that run standalone , we understood it is not web application. Let us know if any disconnect.

You have to download AppServerAgent.zip to monitor java process / application server (JVM), on a side note, we just want to inform MachineAgent.zip is used to monitor hardware resources.

Say you application is as follows:
Ex:

=========
package com.test1;

public class Customer{

 public static void main(String[] args)throws Exception{
    Thread.sleep(60000);
    for(int i=0;i<5000;i++){
        runClient(new Integer(100 + i));
        if(i==40){i=10;}
    }
    Thread.sleep(60000);
 }

 private static int runClient(Integer count){
    System.out.println(count);
    new User().getDetails();
    new Admin().getInfo();
    return count;
 }
 
}

============================

In the above example as we see Customer.runClient is the API that calls the api as we want to monitor User/Admin classes you need to start application as follows:

Ex:
shell> java -javaagent:"D:/AppServerAgent/javaagent.jar" com.test1.Customer

java -javaagent:"<agent_insall_dir>/javaagent.jar"  yourAppName

Please make sure you have provide controller-host, port, application name ,tier and node in <agent_insall_dir>/controller-info.xml, and also create pojo rules under configure -> instrumentation -> transaction detection -> custom rules (pojo rules)

Ex: class-name (equals): com.test1.Customer
method-name(equals): runClient

refer docs:

http://docs.appdynamics.com/display/PRO12S/Install+the+App+Agent+for+Java
http://docs.appdynamics.com/display/PRO12S/POJO+Entry+Points

Let us know how it goes.

Do write back to us for further assistance.


Thanks,

Arun

0 Karma
Get Updates on the Splunk Community!

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...