What the template creates
All resources are named afterobserver-agent:
- A Linux VM
observer-agent: Ubuntu 24.04 LTS,Standard_B1sby default, a Standard SSD OS disk. - A network interface
observer-agent-nicwith the network security groupobserver-agent-nsg. The group has no rules of its own, so Azure’s default rules deny inbound traffic from the internet. - A static public IP
observer-agent-ipfor outbound traffic, unless you turn it off. Nothing listens on it. - With no subnet given, a virtual network
observer-agent-vnet(10.250.0.0/24) with one subnet,agent. - A Custom Script extension,
observer-agent-install, that runs the install script once. The script installs the agent binary as theobserver-agentsystemd service.
Before you start
- Create the agent in Observer: Agents, Add agent, then Cloud platforms. Copy the key. Observer shows it once.
- To check private services, find the subnet in their virtual network. The VM goes in the same subscription and region as that network. The subnet needs outbound internet access: keep the public IP on, or put the VM in a subnet that already has outbound access through a NAT gateway or a firewall.
- Use a new resource group for the agent, in the region of that network. Deleting the group later removes the agent cleanly.
Parameters
Deploy with the button
1
Open the template
Choose Deploy to Azure above and sign in. The portal opens a
custom deployment with the template loaded.
2
Pick the subscription and resource group
Choose the subscription of the network. Under Resource group,
choose Create new (for example
observer-agent) and pick the
region of the network.3
Fill in the parameters
Paste the key into Agent Key. Paste the subnet’s resource ID into
Subnet Id, or leave it empty for a new network. Set Public Ip
to
false only for a subnet that already has outbound access.4
Create it
Choose Review + create, then Create. The deployment finishes
in a few minutes.
Deploy with the Azure CLI
subnetId for a new network. Add publicIp=false or
vmSize=Standard_B1ms to change the other parameters.
Check that it connected
A few minutes after the deployment finishes, the Add agent screen shows Connected and the Agents page marks the agent as running. If it does not connect, read the agent’s logs. The deployment’slogs output (in the portal: the resource group, Deployments, the
deployment, Outputs) holds the command:
observer-agent-install extension as failed. Its output is on the VM
in /var/lib/waagent/custom-script/download/0/ (stdout and
stderr); read it with the same run-command and
cat /var/lib/waagent/custom-script/download/0/stderr. The usual cause
is a subnet without outbound internet access.
Add settings and secrets
The agent reads its environment from/etc/observer-agent/agent.env.
To add a variable, such as PROMETHEUS_SERVER_URL or a secret that a
probe references by name (connection_string_ref and the like),
append it to the file and restart the service:
AGENT_KEY in the same file the same way. See
Environment variables for
every setting.
Upgrades
The template installs the agent binary with the install script. To upgrade, run the script again on the VM. It replaces the binary, restarts the service, and keeps the key and your settings:sh -s -- --version <X.Y.Z> in place
of sh.

