Download PDF
Download page Install the Network Agent on Linux.
Install the Network Agent on Linux
Install the Network Agent Independent of Standalone Machine Agent
You can install and run the Network Agent independently of the Standalone Machine Agent using the ZIP, RPM, or DEB installers.
ZIP Network Agent Install
Important Notes
- If you are using Network Visibility to monitor applications running in Docker containers, you must install the Network Agent in a container as well. See Docker and Network Visibility for additional requirements and recommendations.
- To run the install script, log in as root.
- For all other operations, log in as the designated agent administrator (<appd-agent-administrator>) for that host.
- Check System Requirements: See Network Visibility Requirements and Supported Environments.
Download and unzip the agent installer:
Login User = Agent Administrator
- Log in to the agent host as <
appd-agent-administrator
>. - Go to the Downloads page, download the Network Agent installer, and unzip it.
- In a terminal window,
cd
to the folder where you downloaded the Network Agent ZIP package. Enter the following command, where
<network_agent_home>
is the folder where you want to install the agent software:unzip <installer.zip> -d <network_agent_home>
The parent path should not include any directory names with spaces:
/opt/appdynamics/networkVisibility
(OK)/opt/appdynamics/network visibility
(invalid)
- Log in to the agent host as <
Install the agent:
Login User = root
- Log out and then log in as
root
. - Go to <
network_agent_home
> and run the install script:cd
<network-agent-home>
./install.sh
- Log out and then log in as
Start and verify the agent:
Login User = Agent Administrator
- Log out and then log in as
appd-agent-administrator
. - Open a CLI window and run the following commands:
<network-agent-home>/bin/start.sh
(starts the agent)
(verifies that the agent is running and shows PID of the agent process)<network-agent-home>/bin/
appd-netviz.sh status
- Log out and then log in as
- If you experience any problems or issues, see FAQs for Network Visibility.
- If you are installing the Network Agent as part of a Set Up Network Visibility on Linux workflow, proceed to Set Up the Network and App Agents on Linux.
RPM Network Agent Install
Important Note
If you are using Network Visibility to monitor applications running in Docker containers, you must install the Network Agent in a container as well. See Docker and Network Visibility for additional requirements and recommendations.
- Check System Requirements: See Network Visibility Requirements and Supported Environments.
- If you are logged in to the agent host as a non-root user, log out and then log back in as root.
- Go to the Downloads page and download the Network Agent installer.
- Open a terminal window and enter the following commands:
sudo rpm -ivh <installer.rpm>
(installs the agent underopt/appdynamics/netviz
)
(starts the agent)sudo service appd-netviz start
(verifies that the agent is running)sudo service appd-netviz status
- If you experience any problems or issues, see FAQs for Network Visibility.
- If you are installing the Network Agent as part of a Set Up Network Visibility on Linux workflow, proceed to Set Up the Network and App Agents on Linux.
DEB Network Agent Install
Important Note
If you are using Network Visibility to monitor applications running in Docker containers, you must install the Network Agent in a container as well. See + Docker and Network Visibility for additional requirements and recommendations.
- Check System Requirements: See Network Visibility Requirements and Supported Environments.
- If you are logged in to the agent host as a non-root user, log out and then log back in as root.
- Go to the Downloads page and download the Network Agent installer.
- Open a terminal window and enter the following commands:
(installs the agent undersudo dpkg -i <installer.deb>
opt/appdynamics/netviz
)
(starts the agent, outputs "
")appd-netviz start/running. process <pid #>
(verifies the agent status)sudo service appd-netviz status
- If the agent does not start, run the following:
sudo service appd-netviz start
- If you experience any problems or issues, see FAQs for Network Visibility.
- If you are installing the Network Agent as part of a Set Up Network Visibility on Linux workflow, proceed to Set Up the Network and App Agents on Linux.
Install the Network Agent in a Docker Container
The Network Agent can monitor applications running in Docker containers on the same host. You can deploy one Network Agent per host and collect individual metrics for every local application monitored by a Java App Agent in a container.
AppDynamics recommends that you install the Network Agent in a separate container in Docker Host network mode on the same host as the application containers. This recommendation applies when the App Agent containers are running in Docker Bridge or Docker Host mode.
Example 1: App Agents in Separate Network | Example 2: App Agents in Host Network |
---|---|
Install the Network Agent and App Agents
Paste the sample Dockerfile below into a text file and save the file. This Dockerfile contains commands for installing the Network Agent.
FROM centos:centos7 RUN yum update -y && yum install -y \ net-tools \ iproute \ tcpdump \ curl \ unzip \ sysvinit-tools \ openssh-clients WORKDIR /netviz-agent ARG NETVIZ_ZIP_PKG # copy NetViz agent contents ADD ${NETVIZ_ZIP_PKG} . # run the agent install script RUN unzip *.zip && ./install.sh \ && sed -i -e "s|enable_netlib = 1|enable_netlib = 0|g" ./conf/agent_config.lua \ && sed -i -e "s|WEBSERVICE_IP=.*|WEBSERVICE_IP=\"0.0.0.0\"|g" ./conf/agent_config.lua # default command to run for the agent CMD ./bin/appd-netagent -c ./conf -l ./logs -r ./run
CODENavigate to the directory where you saved the Dockerfile. Build the Docker image by running the following command:
docker build --build-arg NETVIZ_ZIP_PKG=/path/to/netviz-agent-pkg.zip -t appd-netviz .
CODEPush the Docker image to your Docker Trusted Registry.
Deploy your Docker image using the sample Docker Compose file below:
version: '2' services: appd-netviz-agent: image: path/to/your/docker/image # docker registry image network_mode: "host" restart: unless-stopped ports: - '3892:3892' cap_add: - NET_ADMIN - NET_RAW
CODEAlternatively, run the following command:
docker run -d --network=host --cap-add=NET_ADMIN --cap-add=NET_RAW path/to/your/netviz/docker/image
CODESet up the Network Agent. Follow the single-tenant setup instructions on Set Up the Network and App Agents on Linux.
For single-tenant setup, you do not need to enable netlib.
Specify the Docker Host Gateway IP on the App Agent
If you are running the App Agent in a Docker container outside of the Docker Host network (as shown in Example 1 in the diagram above), complete the following steps.
In the host for your App Agent, set the following environment variables:
export APPDYNAMICS_NETVIZ_AGENT_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+') export APPDYNAMICS_NETVIZ_AGENT_PORT=3892
CODE- Set the values for the port and host address.
- If you are using an App Agent version 4.5.1 or earlier:
Open the<app-agent-install-dir>/<version-number>/external-services/netviz/netviz-service.properties
file and set the following properties:- netviz.agent.host.address
- netviz.agent.api.service.port
If you are using an App Agent version 4.5.2 or later:
Run the application Docker image by passing the AppDynamics environment variables which were exported in Step 1. Example:docker run --env "APPDYNAMICS_NETVIZ_AGENT_HOST=$APPDYNAMICS_NETVIZ_AGENT_HOST" --env "APPDYNAMICS_NETVIZ_AGENT_PORT=$APPDYNAMICS_NETVIZ_AGENT_PORT" <application_docker_image>
CODE
- If you are using an App Agent version 4.5.1 or earlier:
Install the Network Agent as an Extension of the Machine Agent (Bundled)
You can install and run the Network Agent as an extension of the Standalone Machine Agent (ZIP only) if you want to install both agents at the same time. This option is available on Linux 32-bit and 64-bit ZIP installers, version 4.4.2 or higher, only.
Important Notes
- If you are using Network Visibility to monitor applications running in Docker containers, you must install the Network Agent in a container as well. See + Docker and Network Visibility for additional requirements and recommendations.
- To run the install script, log in as root.
- For all other operations, log in as the designated agent administrator (<appd-agent-administrator>) for that host.
- Check System Requirements: See Network Visibility Requirements and Supported Environments.
Download and unzip the Standalone Machine Agent:
Login User = Agent Administrator
- Log in to the agent host as <
appd-agent-administrator
>. - Go to the Downloads page, download the Standalone Machine Agent installer, and unzip it.
- Install the Standalone Machine Agent using the Linux ZIP installer as described in the Linux Install Using ZIP with Bundled JRE page.
- Log in to the agent host as <
Install the Standalone Machine Agent and Network Visibility extension:
Login User = root
- Log out and then log in as
root
. - Open a CLI window and enter the following commands:
cd
<standalone-machine-agent-home>/extensions/NetVizExtension
./install-extension.sh
- Log out and then log in as
Enable the Network Visibility extension and start the agent:
Login User = Agent Administrator
- Log out and then log in as <
appd-agent-administrator
>. - Run the following CLI commands:
- <
machine-agent-home
>/bin
/machine-agent -d -p <
(starts the Machine Agent)machine-agent-home
>/pidfile
- <
- Log out and then log in as <
- If you experience any problems or issues, see FAQs for Network Visibility.
- If you are installing the Network Agent as part of a Set Up Network Visibility on Linux workflow, proceed to Set Up the Network and App Agents on Linux.