You can run the official NetBeez Docker Agent (netbeez/nb-agent) serverless in Microsoft Azure using Azure Container Instances (ACI) and the Azure CLI. Once deployed, the container connects automatically to your NetBeez NextGen dashboard and appears under Agents → Network Agents so you can monitor Azure Virtual Networks (VNets), ExpressRoute/VPN gateways, and cloud SaaS performance.
In this article:
Prerequisites
Azure Subscription & CLI: An active Microsoft Azure subscription with an existing Resource Group, plus Azure CLI (
az) installed locally or accessed via Azure Cloud Shell (PowerShell or Bash).Outbound Network Connectivity: Ensure any attached Azure Network Security Group (NSG) or Azure Firewall permits outbound connections to your NetBeez NextGen server and monitored targets (see Network Firewall Settings).
NetBeez Server Secret Key: Sign in to NetBeez NextGen as an Administrator and copy your Server Secret Key from Settings → Information & Health (under Server Information) or from Agents → Network Agents → Install Network Agent → Container (see Secret Key).
Quick Deployment with Azure CLI
Run the following command in PowerShell, Bash, or Azure Cloud Shell to launch the latest netbeez/nb-agent container in Azure Container Instances, substituting your Resource Group name, container name, and NetBeez Server Secret Key:
az container create \ --resource-group <MyResourceGroup> \ --name <ContainerName> \ --image netbeez/nb-agent:latest \ --restart-policy Always \ --environment-variables NB_SECRET_KEY=<DASHBOARD_SECRET_KEY>
Advanced Options: VNet Integration and Persistent Identity
For production monitoring inside a private Azure Virtual Network and persistent agent identity across container redeployments, pass VNet parameters, optional AGENT_UUID, and an Azure Files share mounted at /etc/netbeez/persistence:
az container create \ --resource-group <MyResourceGroup> \ --name <ContainerName> \ --image netbeez/nb-agent:latest \ --restart-policy Always \ --environment-variables NB_SECRET_KEY=<DASHBOARD_SECRET_KEY> AGENT_UUID=<OPTIONAL_EXISTING_UUID> \ --azure-file-volume-account-name <StorageAccountName> \ --azure-file-volume-account-key <StorageAccountKey> \ --azure-file-volume-share-name <FileShareName> \ --azure-file-volume-mount-path /etc/netbeez/persistence \ --vnet <VNetName> \ --vnet-address-prefix <VNetCIDR> \ --subnet <SubnetName> \ --subnet-address-prefix <SubnetCIDR>
Container Environment Variables: Additional container environment flags can be passed via
--environment-variables(or--secure-environment-variablesfor secrets such asNB_SECRET_KEY). Review thenetbeez/nb-agentDocker Hub documentation for supported variables and Replacing an Agent while Preserving its UUID forAGENT_UUIDusage.Full Azure VM Alternative: If you require full Linux VM capabilities (such as kernel-level packet capture or custom system packages) in Azure, provision an Ubuntu 22.04 or Debian 12 Azure Virtual Machine and follow the Cloud guide in Agents → Network Agents → Install Network Agent → Cloud (see Install NetBeez Agents).
Verifying the Azure Agent in NetBeez NextGen
Once Azure finishes provisioning the container group, open Agents → Network Agents in your NetBeez NextGen dashboard to confirm the container agent is reachable, then assign Agent Groups, Targets, and Scheduled Tests. For container image updates, see Agent Configuration - Upgrade Docker Agent.
