Uredi

Deli z drugimi prek


Manage Network Watcher Agent virtual machine extension for Linux

The Network Watcher Agent virtual machine extension is a requirement for some of Azure Network Watcher features that capture network traffic to diagnose and monitor Azure virtual machines (VMs). For more information, see What is Azure Network Watcher?

In this article, you learn how to install and uninstall Network Watcher Agent for Linux. Installation of the agent doesn't disrupt, or require a reboot of the virtual machine. If the virtual machine is deployed by an Azure service, check the documentation of the service to determine whether or not it permits installing extensions in the virtual machine.

Note

Network Watcher Agent extension is not supported on AKS clusters.

Prerequisites

  • An Azure Linux virtual machine (VM). For more information, see Supported Linux distributions and versions.

  • Outbound TCP connectivity to 169.254.169.254 over port 80 and 168.63.129.16 over port 8037. The agent uses these IP addresses to communicate with the Azure platform.

  • Internet connectivity: Network Watcher Agent requires internet connectivity for some features to properly work. For example, it requires connectivity to your storage account to upload packet captures. For more information, see Packet capture overview.

Supported operating systems

Network Watcher Agent extension for Linux can be installed on the following Linux distributions:

Distribution Version
AlmaLinux 9.2
Azure Linux 2.0
CentOS 1 6.10 and 7
Debian 7 and 8
OpenSUSE Leap 42.3+
Oracle Linux 6.10 2, 7 and 8+
Red Hat Enterprise Linux (RHEL) 6.10 3, 7, 8 and 9.2
Rocky Linux 9.1
SUSE Linux Enterprise Server (SLES) 12 and 15 (SP2, SP3, and SP4)
Ubuntu 16+

1 CentOS Linux reached its end-of-life (EOL) on June 30, 2024. For more information, see the CentOS End Of Life guidance.

2 Extended life cycle (ELS) support for Oracle Linux version 6.X ended on July 1, 2024.

3 Extended life cycle (ELS) support for Red Hat Enterprise Linux 6.X ended on June 30, 2024.

Extension schema

The following JSON shows the schema for the Network Watcher Agent extension. The extension doesn't require, or support, any user-supplied settings. The extension relies on its default configuration.

{
    "name": "[concat(parameters('vmName'), '/AzureNetworkWatcherExtension')]",
    "type": "Microsoft.Compute/virtualMachines/extensions",
    "apiVersion": "2023-03-01",
    "location": "[resourceGroup().location]",
    "dependsOn": [
        "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
    ],
    "properties": {
        "autoUpgradeMinorVersion": true,
        "publisher": "Microsoft.Azure.NetworkWatcher",
        "type": "NetworkWatcherAgentLinux",
        "typeHandlerVersion": "1.4"
    }
}

List installed extensions

From the virtual machine page in the Azure portal, you can view the installed extension by following these steps:

  1. Under Settings, select Extensions + applications.

  2. In the Extensions tab, you can see all installed extensions on the virtual machine. If the list is long, you can use the search box to filter the list.

    Screenshot that shows how to view installed extensions on a VM in the Azure portal.

Install Network Watcher Agent VM extension

From the virtual machine page in the Azure portal, you can install the Network Watcher Agent VM extension by following these steps:

  1. Under Settings, select Extensions + applications.

  2. Select + Add and search for Network Watcher Agent and install it. If the extension is already installed, you can see it in the list of extensions.

    Screenshot that shows the VM's extensions page in the Azure portal.

  3. In the search box of Install an Extension, enter Network Watcher Agent for Linux. Select the extension from the list and select Next.

    Screenshot that shows how to install Network Watcher Agent for Linux in the Azure portal.

  4. Select Review + create and then select Create.

Uninstall Network Watcher Agent VM extension

From the virtual machine page in the Azure portal, you can uninstall the Network Watcher Agent VM extension by following these steps:

  1. Under Settings, select Extensions + applications.

  2. Select AzureNetworkWatcherExtension from the list of extensions, and then select Uninstall.

    Screenshot that shows how to uninstall Network Watcher Agent for Linux in the Azure portal.

    Note

    You might see Network Watcher Agent VM extension named differently than AzureNetworkWatcherExtension.

Frequently asked questions (FAQ)

To get answers to most frequently asked questions about Network Watcher Agent, see Network Watcher Agent FAQ.