Domain Mode Agent Installation

For domain mode, the location in which you need to configure the settings depends upon specifics for your environment. Keep in mind that a domain is made up of these components:
  • A domain controller, the administration and configuration server. The domain.xml configuration file is the global configuration for the managed hosts.
  • Host controllers, which manage a particular host containing one or more application server nodes. There can be any number of host controllers and nodes. The hosts.xml file contains settings for the nodes on that host machine.Host Machines

Where you put the configuration, therefore, varies as follows:

  • domain.xml : Settings that can be identical for all hosts in the managed domain (i.e., the log manager and agent files are at the same location on all machines) can go into the domain.xml file for the Domain Controller.
  • host.xml : Settings that need to be specialized for individual hosts (for example, if the paths to relevant files on hosts vary) need to go into the host.xml file.

You can add configuration settings to both domain.xml and host.xml, depending on which are global and which are host-specific. The following sections show an example of adding general settings to the domain configuration and node name setting to the host configuration.

Domain.xml Configuration:
  1. Locate and edit domain.xml for the domain.
    This is usually located under $JBOSS_HOME/domain/configuration/.
  2. Find the system-properties element and add a property named jboss.modules.system.pkgs with a value of com.singularity to the existing system properties.
    For example:
    <system-properties>
            <!-- IPv4 is not required, but setting this helps avoid unintended use of IPv6 -->
            <property name="java.net.preferIPv4Stack" value="true"/>
            <property name="jboss.modules.system.pkgs" value="com.singularity"/>
    </system-properties>
    This property tells the JBoss class loader to load the Splunk AppDynamics packages. This is required for the Java Agent to run.

    Ensure that the property jboss.modules.system.pkgs is available in the environment. If the property is present, then add com.singularity to it.

    For example:
    -Djboss.modules.system.pkgs=org.jboss.byteman,com.singularity
    If the property is not present, then configure a new one:
    -Djboss.modules.system.pkgs=com.singularity
  3. Under the server group name where you want to enable your agents, add the JVM options using the appropriate values for your agent location, JBoss application name, and tier name.
    <server-group name="main-server-group" profile="full">
        <jvm name="default">
             <heap size="1303m" max-size="1303m"/>
             <permgen max-size="256m"/>
             <jvm-options>
                <option value="-javaagent:<agent_install_dir>/javaagent.jar"/> 
                <option value="-Dappdynamics.agent.applicationName=JBOSS-EAP-APP"/>
                <option value="-Dappdynamics.agent.tierName=JBOSS-EAP-TIER"/>
             </jvm-options>
        </jvm>
        <socket-binding-group ref="full-sockets"/>
     </server-group>
    Changes to the domain.xml file require a restart of the management host to take effect. The changes are not propagated to server hosts until they are restarted as well.
Host.xml Configuration

For each host, specify the Splunk AppDynamics node name in the host.xml file, usually located under $JBOSS_HOME/domain/configuration/.

Add the -Dappdynamics.agent.nodeName JVM option to specify the node name for this instance:

<servers>
    <server name="server-one" group="main-server-group"> 
            <jvm name="default">
              <jvm-options>
                <option value="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"/>
                <option value="-Dappdynamics.agent.nodeName=JBOSS-EAP-NODE-1"/>
              </jvm-options>
            </jvm>
     </server>
     <server name="server-two" group="main-server-group" auto-start="true">
            <socket-bindings port-offset="150"/>
            <jvm name="default">
              <jvm-options>
                <option value="-Dappdynamics.agent.nodeName=JBOSS-EAP-NODE-2"/>
              </jvm-options>
            </jvm>
      </server>
      <server name="server-three" group="other-server-group" auto-start="false">
            <socket-bindings port-offset="250"/>
      </server>
</servers>

For brevity, comments have been removed from the sample.