This page applies to an earlier version of the AppDynamics App IQ Platform.
For the latest documentation, see the 4.5 Documentation.

Skip to end of metadata
Go to start of metadata

On this page:

Related pages:

You can configure the Java Agent for those JVMs that run as cron or batch jobs where the JVM runs only for the duration of the job. AppDynamics monitors the main method of the Java program.

Configure the Java Agent

  1. Add the application and tier name to the controller-info.xml file.
  2. Add the appdynamics.cron.vm property to the AppDynamics javaagent command in the startup script of your JVM process:

    -javaagent:<agent_home>/javaagent.jar -Dappdynamics.agent.nodeName=${NODE_NAME} -Dappdynamics.cron.vm=true

The appdynamics.cron.vm property creates a delay between the end of the main method and the JMV exit so that the Agent has time to upload metrics to the Controller.

Use the Script Name as the Node Name

You can use the script name that executes the cron or batch job as the node name.

The following commands set the value of variable NODE_NAME using the combination of the script and host name. Add these commands to the startup script of the JVM.

# Use the name of the script (no path, no extension) as the name of the node.
# Localize the script to the host.