Whether the JVMs serve the same or different tiers:
All the common information should be configured using controller-info.xml.
All the information unique to a JVM should be configured using the system properties (-D option) in the startup script.
Information in the startup scripts always overrides the information in the controller-info.xml file.
Any customizations to app-agent-config.xml and custom-activity-correlation.xml configuration will apply to all agents.
This scenario can generate a lot of logs and disk IO activity. You can edit the log configuration to control the maximum size of individual logs, as well as the number of logs the agent retains for log rotation at <agent_home>/<version_number>/conf/logging/log4j.xml.
How do I configure the Agents for the same tier?
For this case, you only need to differentiate the node names in the JVM startup script and use controller-info.xml for the other settings, as follows:
Configure the application and tier name in controller-info.xml.
Add the javaagent argument and system property for the node name to the batch file or startup script of each JVM.
Separate the system properties with a whitespace character.
Some application server management consoles allow you to specify start-up arguments using a web interface.
How do I attach a single Java Agent to different Java applications?
To attach the same single Java Agent with different java applications:
Make sure to provide different node names for each of the applications, because Javaagent writes node-specific logs and configuration files to the javaagent installation directory under the "Node name" folder.
Apart from adding the-javaagent argument to JAVA_OPTS/CATALINA_OPTS, you also need to add the following arguments:
Add other remaining common setting details in the controller-info.xml file.
Note: If all the applications are actually instances of the same application, you can skip adding applicationName. Instead, add this common argument (i.e., applicationName or tierName) to controller-info.xml.