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)
- 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. 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 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: - Log in to the WebSphere Application Server administrative console of the Cognos server.
- Click Servers > Server Types > WebSphere application servers.
- Click the
cognos_server link. - Click JAVA > Process Management > Process definition > Environment Entries > New to add this entry:
LD_PRELOAD=/usr/appd/agents/netviz/lib/appd-netlib.so
- In the WebSphere/InfoSphere UI, navigate to the Java Virtual Machine properties page for the monitored server.
- 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: - Log in to the WebSphere Application Server administrative console of the Cognos server.
- Go to Servers > Server Types > WebSphere Application Servers.
- Click
cognos_server . - 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 : - 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 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: - 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 AgentThese 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 unzip external-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 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.
|