PDFs


This page applies to an earlier version of the AppDynamics App IQ Platform.
See the latest version of the documentation.


On this page:

Your Rating:
Results:
PatheticBadOKGoodOutstanding!
47 rates

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. 

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 JVM 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.
NODE_NAME=sample
NODE_NAME="${NODE_NAME%%.}"
echo $NODE_NAME
# Localize the script to the host.
NODE_NAME="$NODE_NAME@$HOSTNAME"