on
07-08-2025
10:29 AM
- edited on
07-08-2025
11:31 AM
by
Tyler Langston
ThousandEyes’ flexibility allows you to place Enterprise Agents virtually anywhere your company has a network presence. However, deploying these Agents in cloud environments like Azure can introduce unwanted administrative and operations overhead.
This guide will show you how an Azure Resource Manager (ARM) template can reduce the overhead in the agent deployment process.
This article assumes you have the following knowledge, tools & access:
Azure
ThousandEyes
The rule of thumb for an ideal agent placement is to deploy the Virtual Machine as close to the resources handling the workflows as possible. Here are a few examples:
Connectivity over Expressroute
Connectivity over S2S VPN
1. Log in to your Azure Portal
2. On the search bar, look for and select the ‘Deploy a custom template’ option
3. Select ‘Build your own template in the editor’
4. Copy and paste the following JSON in the template editor, then click on Save:
{ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "accountGroupToken": { "type": "String", "metadata": { "description": "The token for the ThousandEyes account group that the Enterprise Agent will belong to. You can find your ThousandEyes account group token under ThousandEyes Agent Settings." } }, "enableBrowserTests": { "defaultValue": true, "type": "Bool", "metadata": { "description": "Allow enabling ThousandEyes Browser test capabilities (Page Load and Transaction)." } }, "hostname": { "type": "String", "metadata": { "description": "Specify the VM hostname, this will also be the Agent name." } }, "VMSize": { "defaultValue": "Standard_B2s", "type": "String", "metadata": { "description": "Select the size of the Agent VM. Standard_B1s - 1 vCPU, 1 GB Mem; Standard_B2s - 2 vCPU, 4 GB Mem; Standard_D2_v2 - 2 vCPU, 7 GB Mem" } }, "ubuntuOSVersion": { "defaultValue": "22.04-LTS", "allowedValues": [ "22.04-LTS" ], "type": "String", "metadata": { "description": "This will use a fully patched image of your selected Ubuntu version. The \"Ubuntu Pro for Azure\" option is required to deploy this image." } }, "enableAutoPatch": { "defaultValue": "Yes", "allowedValues": [ "Yes", "No" ], "type": "String", "metadata": { "description": "Auto Patch is a feature that safely and automatically patches your virtual machine OS to maintain security compliance." } }, "adminUsername": { "defaultValue": "thousandeyes", "type": "String", "metadata": { "description": "Specify the admin user name for the VM." } }, "SSHPublicKey": { "type": "SecureString", "metadata": { "description": "Public key used to SSH to the Agent." } }, "proxyType": { "defaultValue": "None", "allowedValues": [ "None", "STATIC" ], "type": "String", "metadata": { "description": "If using a proxy, specify the proxy type. Default is none." } }, "proxyHost": { "defaultValue": "", "type": "String", "metadata": { "description": "If using a proxy, specify the proxy host and port (host:port)" } }, "proxyUser": { "defaultValue": "", "type": "String", "metadata": { "description": "If using a proxy, specify the proxy user (if required)." } }, "proxyPass": { "defaultValue": "", "type": "SecureString", "metadata": { "description": "If using a proxy, specify the proxy password (if required)." } }, "virtualNetworkResourceGroup": { "type": "String", "metadata": { "description": "Resource group of the existing VNet" } }, "virtualNetworkName": { "type": "String", "metadata": { "description": "Existing VNet Name" } }, "subnetName": { "type": "String", "metadata": { "description": "Existing Subnet Name" } }, "nicName": { "type": "String", "metadata": { "description": "Name for the new VM's NIC" } }, "publicIPAddressName": { "type": "String", "metadata": { "description": "Public IP Address Name for the new VM" } } }, "variables": { "imagePublisher": "[if(equals(parameters('ubuntuOSVersion'),'22.04-LTS'),'canonical','Canonical')]", "imageOffer": "[if(equals(parameters('ubuntuOSVersion'),'22.04-LTS'),'0001-com-ubuntu-server-jammy','UbuntuServer')]", "imageSku": "[if(equals(parameters('ubuntuOSVersion'),'22.04-LTS'),'22_04-lts',parameters('ubuntuOSVersion'))]", "imageVersion": "latest", "nicName": "[parameters('nicName')]", "vmName": "[parameters('hostname')]", "existingvnetId": "[resourceId(parameters('virtualNetworkResourceGroup'),'Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", "subnetId": "[concat(variables('existingvnetId'),'/subnets/',parameters('subnetName'))]", "publicIPAddressName": "[parameters('publicIPAddressName')]", "publicIPAddressType": "Dynamic", "linuxConfiguration": { "disablePasswordAuthentication": true, "ssh": { "publicKeys": [ { "path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]", "keyData": "[parameters('SSHPublicKey')]" } ] }, "provisionVMAgent": true, "patchSettings": { "patchMode": "[if(equals(parameters('enableAutoPatch'),'Yes'), 'AutomaticByPlatform', 'ImageDefault')]" } }, "bbotArg": "[if(parameters('enableBrowserTests'), ' -b ', '')]", "proxyTypeArg": "[if(equals(parameters('proxyType'), 'None'), '', concat(' -t ', parameters('proxyType'), ' '))]", "proxyHostArg": "[if(empty(parameters('proxyHost')), '', concat(' -P ', parameters('proxyHost'), ' '))]", "proxyUserArg": "[if(empty(parameters('proxyUser')), '', concat(' -U ', parameters('proxyUser'), ' '))]", "proxyPassArg": "[if(empty(parameters('proxyPass')), '', concat(' -u ', parameters('proxyPass'), ' '))]", "proxyHttp": "[if(empty(parameters('proxyUser')), concat(parameters('proxyHost')), concat(parameters('proxyUser'), ':', parameters('proxyPass'),'@', parameters('proxyHost')))]", "proxyEnv": "[if(empty(parameters('proxyHost')), '', variables('proxyHttp'))]", "cloudInitWriteProxyApt": "[concat('\n- path: /etc/apt/apt.conf.d/90proxyapt\n append: false\n content: |\n Acquire::http::proxy \"http://',variables('proxyEnv'), '\";', '\n Acquire::https::proxy \"http://',variables('proxyEnv'), '\";')]", "cloudInitWriteProxyEnv": "[concat('\n- path: /etc/environment\n append: true\n content: |\n http_proxy=',variables('proxyEnv'),'\n https_proxy=',variables('proxyEnv'))]", "teReleaseFile": "[concat('\n- path: /etc/te-release\n append: true\n content: |\n DISTRIB_FAMILY=AZURE_ARM\n DISTRIB_RELEASE=86fbdd9')]", "customDataProxy": "[concat('#cloud-config', '\n\nwrite_files:', variables('cloudInitWriteProxyApt') , variables('cloudInitWriteProxyEnv'), variables('teReleaseFile'),'\n\nruncmd:', '\n- export http_proxy=',variables('proxyEnv'),'\n- export https_proxy=',variables('proxyEnv'), '\n- curl -Os https://downloads.thousandeyes.com/agent/install_thousandeyes.sh\n- chmod +x install_thousandeyes.sh\n- sudo ./install_thousandeyes.sh ', variables('bbotArg'), variables('proxyTypeArg'), variables('proxyHostArg'), variables('proxyUserArg'), variables('proxyPassArg'), parameters('accountGroupToken'))]", "customDataNoProxy": "[concat('#cloud-config', '\n\nwrite_files:', variables('teReleaseFile') , '\n\nruncmd:\n- curl -Os https://downloads.thousandeyes.com/agent/install_thousandeyes.sh\n- chmod +x install_thousandeyes.sh\n- sudo ./install_thousandeyes.sh ', variables('bbotArg'), parameters('accountGroupToken'))]", "networkSecurityGroupName": "default-NSG", "customData": "[if(equals(parameters('proxyType'), 'None'), variables('customDataNoProxy'), variables('customDataProxy'))]", "location": "[resourceGroup().location]" }, "resources": [ { "type": "Microsoft.Network/publicIPAddresses", "apiVersion": "2019-06-01", "name": "[variables('publicIPAddressName')]", "location": "[variables('location')]", "properties": { "publicIPAllocationMethod": "[variables('publicIPAddressType')]" } }, { "type": "Microsoft.Network/networkInterfaces", "apiVersion": "2019-06-01", "name": "[variables('nicName')]", "location": "[variables('location')]", "dependsOn": [ "[variables('publicIPAddressName')]" ], "properties": { "ipConfigurations": [ { "name": "ipconfig1", "properties": { "privateIPAllocationMethod": "Dynamic", "publicIPAddress": { "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" }, "subnet": { "id": "[variables('subnetId')]" } } } ] } }, { "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2021-03-01", "name": "[variables('vmName')]", "location": "[variables('location')]", "dependsOn": [ "[variables('nicName')]" ], "properties": { "hardwareProfile": { "VMSize": "[parameters('VMSize')]" }, "osProfile": { "computerName": "[variables('vmName')]", "adminUsername": "[parameters('adminUsername')]", "linuxConfiguration": "[variables('linuxConfiguration')]", "customData": "[base64(variables('customData'))]" }, "storageProfile": { "imageReference": { "publisher": "[variables('imagePublisher')]", "offer": "[variables('imageOffer')]", "sku": "[variables('imageSku')]", "version": "[variables('imageVersion')]" }, "osDisk": { "createOption": "FromImage" } }, "networkProfile": { "networkInterfaces": [ { "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" } ] } } } ] }
5. Fill out the following information, then click on ‘Review + create’:
6. Once the final validation is completed, click on 'Create' to begin the deployment.
7. Wait until the deployment is completed, you should see a Virtual Machine, a Network Interface and a Public IP address being created; this process should take 3-5 minutes.
1. Go to the newly created Virtual Machine and verify the following items:
2. You should see the new Agent registered on the ThousandEyes platform after 3-5 minutes
3. Your new Agent is ready to run tests!
More information about network requirements for Enterprise Agents can be found here.
Need more support?
Contact our Support team
Ask our Community Forum
Learn the ThousandEyes Essentials
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: