Skip to main content
The template puts the Observer Agent on a small Linux VM in a subnet you choose, or in a new network of its own. From there the agent checks what that subnet can reach, such as private databases, internal APIs and Prometheus. It only makes outbound calls: no inbound port is open. Your cloud’s pricing applies to everything the template creates. Deploy to Azure

What the template creates

All resources are named after observer-agent:
  • A Linux VM observer-agent: Ubuntu 24.04 LTS, Standard_B1s by default, a Standard SSD OS disk.
  • A network interface observer-agent-nic with the network security group observer-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-ip for 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 the observer-agent systemd service.
The agent key reaches the VM in the extension’s protected settings, which Azure encrypts and never returns. The VM gets a generated admin password because Azure requires one; no sign-in port is open.

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.
To print a subnet’s resource ID:

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

Drop 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’s logs output (in the portal: the resource group, Deployments, the deployment, Outputs) holds the command:
The agent logs every failed call to Observer with the reason. The most common cause is a wrong or replaced agent key. If the install itself failed, the deployment reports the 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:
After a key rotation, replace 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:
To install a given release, use sh -s -- --version <X.Y.Z> in place of sh.

Remove

Delete the resource group:
Or open the resource group in the portal and choose Delete resource group. Delete the agent in Observer (Agents) too if you no longer need it.
Shared resource groupsDeleting a resource group deletes everything in it. If you deployed into a group that holds other resources, delete only the agent’s: the VM observer-agent (its OS disk and network interface go with it), then observer-agent-ip, observer-agent-nsg and, if the template created it, observer-agent-vnet.