Download PDF
Download page Install the Network Agent on Linux.
Install the Network Agent on Linux
Install the Network Agent Independent of Machine Agent
You can install and run the Network Agent independently of the 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.
- 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 Supported Environments.
Download and unzip the Agent installer:
Login User = Agent Administrator
- Log in to the Agent host as <
appd-agent-administrator
>. - Access the AppDynamics Downloads Portal, 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
(correct)/opt/appdynamics/network visibility
(incorrect)
- 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 enter these 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.
- Check System Requirements. See Network Visibility 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
. - Access the AppDynamics Downloads Portal and download the Network Agent installer.
- Open a terminal window and enter these 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.
- Check System Requirements. See Network Visibility 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
. - Access the AppDynamics Downloads Portal and download the Network Agent installer.
- Open a terminal window and enter the following commands:
s
udo dpkg -i <
(installs the Agent underinstaller.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, enter:
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 into a text file and save the file. This sample 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 entering:
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 this sample Docker Compose file:
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, enter:
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), complete these steps.
In the host for your App Agent, enter these environment variables:
export APPDYNAMICS_NETVIZ_AGENT_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+') export APPDYNAMICS_NETVIZ_AGENT_PORT=3892
CODESet the values for the port and host address. Run the application Docker image by passing the AppDynamics environment variables which were exported in Step 1. For 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
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 Machine Agent (ZIP only) if you want to install both Agents at the same time.
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.
- 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 Supported Environments.
Download and unzip the Machine Agent:
Login User = Agent Administrator
- Log in to the Agent host as <
appd-agent-administrator
>. - Access the AppDynamics Downloads Portal, download the Machine Agent installer, and unzip it.
- Install the 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 Machine Agent and Network Visibility extension:
Login User = root
- Log out and then log in as
root
. - Open a CLI window and enter:
cd <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
>. - Enter the CLI command:
- <
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.