Download PDF
Download page Set Up the Network and App Agents on Linux.
Set Up the Network and App Agents on Linux
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.11 | Install 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 |
Network Agent <= 4.5.6 | Install the Network Agent in a multi-tenant setup or a single tenant setup. You need to manually enable the |
Java App Agent <= 4.4 | Update 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
- Configure the Java App Agent startup command to perform these tasks, as shown in the example:
- Enable
for the Network Agent to map network metrics to application flows.appdynamics.socket.collection.bci.enable
For example:java -javaagent:<
>app_server_agent_home
/javaagent.jar
\
-
Dappdynamics.socket.collection.bci.enable=true
- Enable
- Click here to expand...
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.
Framework Example (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
andappdynamics.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
- 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.
- Open the following file:
<app-agent-install-dir>/<version-number>/external-services
/netviz/netviz-service.properties
(You might need to unzipexternal-services/
netviz.zip
to access this file.) - 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
- Restart the App Agent.
- 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 is404 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
- Open the following file in a text editor:
<network_agent_home>/conf/agent_config.lua
- 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
- Navigate to the folder:
<app-agent-install-dir>/<version-number>/external-services
- 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
- 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)
- Preload the
- Enable
for the Network Agent to map network metrics to application flowsappdynamics.socket.collection.bci.enable
For example:LD_PRELOAD=/
/lib/appd-netlib.so<network-agent-home>
\
java -javaagent:<
>app_server_agent_home
/javaagent.jar
\-
Dappdynamics.socket.collection.bci.enable=true
- Enable
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.
Framework | Example (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:/usr/appd/agents/apm/javaagent.jar -Dappdynamics.socket.collection.bci.enable=true You can add
You can add
|
Apache Tomcat | Add the full command as a Catalina environment variable in file
|
Glassfish | Add the full command as a
|
JBoss Standalone | Add the full command to the
|
Jetty | For a standalone Jetty using
For service with embedded Jetty:
|
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.
- Open the file:
<app-agent-install-dir>/<version-number>/external-services
/netviz/netviz-service.properties
(You might need to unzipexternal-services/
netviz.zip
to access this file.) - 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
- Restart the App Agent.
- 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 is404 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
- Navigate to folder:
<app-agent-install-dir>/<version-number>/external-services
- 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.
- In the Controller, click the gear icon (
) and select AppDynamics Agents > App Server Agents.
- Select the Agent in the table and click Configure. The App Server Agent Configuration page appears.
- Select the application, tier, and node in the treeview (left).
- Select Use Custom Configuration and then click + Create Agent Property.
- In the Edit Agent Property dialog, specify:
- Name = socket-enabled
- Type = Boolean
- Value = true
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.
- Open the file:
<app-agent-install-dir>/<version-number>/external-services
/netviz/netviz-service.properties
(You might need to unzipexternal-services/
netviz.zip
to access this file.) - 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
- Restart the App Agent.
- 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 is404 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.