Network Agent 4.5.7 and Java Agent 4.5.11 eliminate the need to separately configure the Network Agent in a multi-tenant setup when running multiple nodes on the same machine. If you use the Network Agent 4.5.7 with Java Agent <= 4.5.10, you need to configure the Network Agent in a multi-tenant setup. See Network Agent and Java Agent Installation Instructions.

Network Agent and Java Agent Installation Instructions

If you are using
then
Network Agent >= 4.5.7 and Java Agent >= 4.5.11Install the Network Agent.
Network Agent >= 4.5.7 and Java Agent <= 4.5.10

Install the Network Agent in a multi-tenant setup or a single tenant setup.

You do not need to manually enable the netlib parameter during the multi-tenant setup, it is enabled by default.

Network Agent <= 4.5.6

Install the Network Agent in a multi-tenant setup orsingle tenant setup.

You need to manually enable the netlib parameter during the multi-tenant setup.

Java App Agent <= 4.4Update the Java Agent.

Install the Network Agent

If you are using Java Agent >= 4.5.13, you do not need to manually enable the socket collection. It is enabled automatically. You can skip Step 1 and proceed to Step 2.

Enable Socket Collection on the App Agent  
  1. Configure the Java App Agent startup command to perform these tasks, as shown in the example:
    • Enable appdynamics.socket.collection.bci.enable for the Network Agent to map network metrics to application flows.
      For example:

      java -javaagent:<app_server_agent_home>/javaagent.jar \
      -Dappdynamics.socket.collection.bci.enable=true
  2. The following examples illustrate how editing the Agent startup command can differ, depending on the framework of the monitored application. See Agent Installation by Java Framework and its relevant framework documentation.

    FrameworkExample (App Agent ZIP)
    IBM WebSphere and InfoSphere

    In the WebSphere/InfoSphere UI, navigate to the Java Virtual Machine properties page for the monitored server. Then, add javaagent and appdynamics.socket.collection.bci.enable=true as a Generic JVM argument. For example:

    javaagent:/usr/appd/agents/apm/javaagent.jar -Dappdynamics.socket.collection.bci.enable=true
    Apache Tomcat

    Add the full command as a Catalina environment variable in file CATALINA_BASE/bin/setenv.sh (Tomcat 6 and later). For example:

    export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/usr/appd/agents/apm/javaagent.jar -Dappdynamics.socket.collection.bci.enable=true"
    Glassfish

    Add the full command as a -javaagent JVM option in the GlassFish domain. You can add the Agent using the asadmin tool. For example: 

    export LD_PRELOAD=/usr/appd/agents/netviz/lib/appd-netlib.so
    glassfish4\bin\asadmin create-jvm-options "-
    javaagent\:/usr/appd/agents/apm/javaagent.jar:-Dappdynamics.socket.collection.bci.enable=true"
    JBoss Standalone

    Add the full command to the standalone.sh file. For example:

    export JAVA_OPTS="$JAVA_OPTS -javaagent:/usr/appd/agents/apm/javaagent.jar -Dappdynamics.socket.collection.bci.enable=true"

    Jetty

    Add the full command to the start.ini config file in the Jetty base directory. For example:

    --exec -javaagent:/usr/appd/agents/apm/javaagent.jar -Dappdynamics.socket.collection.bci.enable=true
  3. To verify that the App Agent is running correctly, enter:
    strings /proc/<app_pid>/environ
Specify the Docker Host Gateway IP on the App Agent

These steps are required only if the App Agent is running in a Docker container outside of the Docker Host network.

  1. Open the following file: <app-agent-install-dir>/<version-number>/external-services/netviz/netviz-service.properties
    (You might need to unzip  external-services/netviz.zip to access this file.)
  2. For the netviz.agent.host.address, specify the Gateway IP of the Docker Host network interface. 
    To determine this IP, enter this command on the Docker host: 
    docker inspect <app_container_name> | grep Gateway 
  3. Restart the App Agent. 
  4. To determine if the Docker Host network is connected, enter this command from within the container: 
     curl -k -v <host-network-IP>:3892
    If you receive a response,  even if it is 404 Not Found, then the network is connected.
Restart the App (IBM JVM Only)

If the monitored app is running in an IBM JVM, you must restart the app for the Network Agent to detect and monitor any persistent connections.


Multi-Tenant Setup (Multiple Apps on the Agent Host)

If you want the Network Agent to monitor multiple app nodes on the same host, you perform the following steps for each App Agent.

If you are using Network Agent <= 4.5.6, enable the netlib parameter manually as described in Step 1.


Enable Netlib on the Network Agent

  1. Open the following file in a text editor: <network_agent_home>/conf/agent_config.lua
  2. Edit the enable_netlib parameter:
    npm_config = {
          log_destination = "file",
          log_file = "agent.log",
          debug_log_file = "agent-debug.log",
          disable_filter = 1,
          mode = "Advanced",
          enable_netlib = 1,
          lua_scripts_path = ROOT_DIR .. "/scripts/netagent/lua/",
    } 
Install or Update the App Agent (if needed)

The Network Agent requires Java App Server Agent >= 4.4. Update each App Agent that is running an earlier version. See Install the Java Agent

Extract the NetViz External Services Folder on the App Agent
  1. Navigate to the folder: <app-agent-install-dir>/<version-number>/external-services
  2. If not already extracted, extract the netviz.zip archive so that the ZIP contents are under this folder: 
        <app-agent-install-dir>/<version-number>/external-services
Preload NetLib and Enable Socket Collection on the App Agent  
  1. You must configure the Java App Agent startup command to perform two additional tasks, as shown in the following:
    • Preload the appd-netlib library so the Network Agent can collect network metrics for each individual node (rather than for the entire host)
    • Enable appdynamics.socket.collection.bci.enable for the Network Agent to map network metrics to application flows
      For example:
      LD_PRELOAD=/<network-agent-home>/lib/appd-netlib.so \
      java -javaagent:<app_server_agent_home>/javaagent.jar \
      -Dappdynamics.socket.collection.bci.enable=true

The following examples illustrate how editing the Agent startup command can differ, depending on the framework of the monitored application. See Agent Installation by Java Framework and its relevant framework documentation.

FrameworkExample (App Agent ZIP)
IBM WebSphere and InfoSphere

In the WebSphere/InfoSphere UI, navigate to the Java Virtual Machine properties page for the monitored server. Then add javaagent and appdynamics.socket.collection.bci.enable=true as a Generic JVM argument. For example:

javaagent:/usr/appd/agents/apm/javaagent.jar -Dappdynamics.socket.collection.bci.enable=true

You can add LD_PRELOAD as a JVM environment variable. This example describes how to add an environment variable on a Cognos server using IBM Connections 6.0.0:

    1. Log in to the WebSphere Application Server administrative console of the Cognos server.
    2. Click Servers > Server Types > WebSphere application servers.
    3. Click the cognos_server link.
    4. Click JAVA > Process Management > Process definition > Environment Entries > New to add this entry:
      LD_PRELOAD=/usr/appd/agents/netviz/lib/appd-netlib.so
  1. In the WebSphere/InfoSphere UI, navigate to the Java Virtual Machine properties page for the monitored server.
  2. Add javaagent and appdynamics.socket.collection.bci.enable=true as a Generic JVM argument. For example:

javaagent:/usr/appd/agents/apm/javaagent.jar -Dappdynamics.socket.collection.bci.enable=true

You can add LD_PRELOAD as a system environment variable. This example describes how to add an environment variable on a Cognos server using IBM Connections 6.0.0:

  1. Log in to the WebSphere Application Server administrative console of the Cognos server.
  2. Go to Servers Server Types > WebSphere Application Servers.
  3. Click cognos_server.
  4. Go to Java > Process Management > Process Definition > Environment Entries New to add this entry: 
    LD_PRELOAD=/usr/appd/agents/netviz/lib/appd-netlib.so
Apache Tomcat

Add the full command as a Catalina environment variable in file CATALINA_BASE/bin/setenv.sh (Tomcat 6 and later). For example:

export LD_PRELOAD=/<network-agent-home-directory>/lib/appd-netlib.so

export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/<java-agent-home-directory>/javaagent.jar -Dappdynamics.socket.collection.bci.enable=true"

Glassfish

Add the full command as a -javaagent JVM option in the GlassFish domain. You can add the Agent using the asadmin tool. For example: 

export LD_PRELOAD=/<network-agent-home-directory>/lib/appd-netlib.so

glassfish4\bin\asadmin create-jvm-options

"-javaagent\:/<java-agent-home-directory>/javaagent.jar:-Dappdynamics.socket.collection.bci.enable=true"

JBoss Standalone

Add the full command to the standalone.sh file. For example:

export LD_PRELOAD=/<network-agent-home-directory>/lib/appd-netlib.so

JAVA_OPTS="$JAVA_OPTS -

javaagent:/<java-agent-home-directory>/javaagent.jar -Dappdynamics.socket.collection.bci.enable=true"

Jetty

For a standalone Jetty using start.jar:

    1. Add the full command to the start.ini config file in the Jetty base directory. For example:
      exec
      javaagent:/usr/appd/agents/apm/javaagent.jar -Dappdynamics.socket.collection.bci.enable=true
    2. Create a script to start Jetty. For example, startJetty.sh:

      export LD_PRELOAD=/usr/appdynamics/agents/netviz/lib/appd-netlib.so java -jar start.jar

For service with embedded Jetty:

    1. Create a script to start Jetty. For example, startJetty.sh:
      export LD_PRELOAD=/<network-agent-home-directory>/lib/appd-netlib.so
      java -javaagent:/<java-agent-home-directory>/javaagent.jar -Dappdynamics.socket.collection.bci.enable=true -jar <embedded_jetty_jar>


To verify that the App Agent is running correctly, enter:
strings /proc/<app_pid>/environ

Specify the Docker Host Gateway IP on the App Agent

These steps are required only if the App Agent is running in a Docker container outside of the Docker Host network.

  1. Open the file: <app-agent-install-dir>/<version-number>/external-services/netviz/netviz-service.properties
    (You might need to unzip  external-services/netviz.zip to access this file.)
  2. For the netviz.agent.host.address, specify the Gateway IP of the Docker Host network interface. 
    To determine this IP, run this command on the Docker host: 
    docker inspect <app_container_name> | grep Gateway 
  3. Restart the App Agent. 
  4. To determine if the Docker Host network is connected, run this command from within the container: 
     curl -k -v <host-network-IP>:3892
    If you receive a response, even if it is 404 Not Found, then the network is connected.
Restart the App (IBM JVM Only)

If the monitored app is running in an IBM JVM, you must restart the app for the Network Agent to detect and monitor any persistent connections.


Single-Tenant Setup (One App Only on the Agent Host)

If you want the Network Agent to monitor one app node only on the same host, perform these steps:

Install or Update the App Agent (if needed)

Network Visibility requires a Java App Agent >= 4.4 installed on the same host as the Network Agent. See Install the Java Agent.

Extract the NetViz External Services Folder on the App Agent
  1. Navigate to folder: <app-agent-install-dir>/<version-number>/external-services
  2. If not already extracted, extract the netviz.zip archive so that the ZIP contents are under this folder: 
        <app-agent-install-dir>/<version-number>/external-services
Enable Socket Instrumentation

This is required for the Agent to map network metrics to application flows.

  1. In the Controller, click the gear icon () and select AppDynamics Agents > App Server Agents.
  2. Select the Agent in the table and click Configure. The App Server Agent Configuration page appears. 
  3. Select the application, tier, and node in the treeview (left).
  4. Select Use Custom Configuration and then click + Create Agent Property.
  5. In the Edit Agent Property dialog, specify:
    1. Name = socket-enabled
    2. Type = Boolean
    3. Value = true

Create Agent Property

Specify the Docker Host Gateway IP on the App Agent

These steps are required only if the App Agent is running in a Docker container outside of the Docker Host network.

  1. Open the file: <app-agent-install-dir>/<version-number>/external-services/netviz/netviz-service.properties
    (You might need to unzip  external-services/netviz.zip to access this file.)
  2. For the netviz.agent.host.address, specify the Gateway IP of the Docker Host network interface. 
    To determine this IP, run this command on the Docker host: 
    docker inspect <app_container_name> | grep Gateway 
  3. Restart the App Agent. 
  4. To determine if the Docker Host network is connected, run this command from within the container: 
     curl -k -v <host-network-IP>:3892
    If you receive a response, even if it is 404 Not Found, then the network is connected.
Restart the App (IBM JVM Only)

If the monitored app is running in an IBM JVM, you must restart the app for the Network Agent to detect and monitor any persistent connections.