Skip to main content
The stack puts the Observer Agent on a small 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: the stack adds no inbound rule. Your cloud’s pricing applies to everything the stack creates. Deploy to Oracle Cloud

What the stack creates

  • A VM observer-agent: Ubuntu 24.04, shape VM.Standard.A1.Flex by default. Flex shapes get 1 OCPU and 2 GB of memory. Legacy instance metadata endpoints are turned off.
  • With no subnet given, a network of its own: the VCN observer-agent-vcn (10.250.0.0/24) with an internet gateway, a route table, one public subnet and the security list observer-agent-outbound-only, which allows no inbound traffic.
At first boot, cloud-init runs the install script, which installs the agent binary as the observer-agent systemd service. In your own subnet the stack adds no rules: the subnet’s security lists and network security groups apply as they are. The agent opens no port that needs an inbound rule.
Where the key is storedThe key is in the instance metadata (the cloud-init user data). Users of your tenancy who can read the instance can read it. Resource Manager also keeps it in the stack’s variables and Terraform state, so limit who can read the stack’s compartment.

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 their VCN and a subnet in it with outbound internet access: a public subnet with a public IP (the default), or a private subnet behind a NAT gateway with the public IP turned off.
  • For the Always Free shapes, deploy in your tenancy’s home region: Oracle only offers Always Free compute instances there.

Form fields

Deploy

1

Open the stack

Choose Deploy to Oracle Cloud above and sign in. Resource Manager opens Create stack with the template loaded. Check the region in the console header, accept the Oracle terms of use, choose the compartment and choose Next.
2

Fill in the form

Paste the key into Agent key. To check private services, pick their Virtual cloud network and Subnet; leave both empty for a new network. Choose a Shape, then Next.
3

Create and apply

On the review page, tick Run apply and choose Create. Resource Manager creates the stack and runs an apply job. The job’s outputs show instance_id and logs.
Out of host capacityAlways Free A1 capacity can run out. The apply job then fails with an “Out of host capacity” error. Edit the stack (Edit, Edit stack), pick another availability domain or the VM.Standard.E2.1.Micro shape, save, and run Apply again. VM.Standard.E2.1.Micro is offered in one availability domain per region: if the job says the shape is not available, pick another availability domain.

Deploy with Terraform

The stack is plain Terraform. With the Terraform CLI and an OCI CLI profile in ~/.oci/config:
Add -var subnet_id=..., -var assign_public_ip=false, -var shape=VM.Standard.E2.1.Micro or -var availability_domain=... to change the other fields.

Check that it connected

A few minutes after the apply job succeeds, the Add agent screen shows Connected and the Agents page marks the agent as running. The VM first boots, then downloads and installs the agent. If it does not connect, start with the VM’s boot output: open the instance, then Console history, Capture console history. It includes the cloud-init output, where the install script prints each step. The usual cause of a failed install is a subnet without outbound internet access. To read the agent’s own logs you need a shell on the VM. The stack adds no SSH key and no inbound rule, so use the access your tenancy already has, such as the OCI Bastion service or an SSH key with an ingress rule you add. Then run the stack’s logs output:
The agent logs every failed call to Observer with the reason. The most common cause is a wrong or replaced agent key.

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), edit the file from a shell on the VM and restart the service:
After a key rotation, put the new key in AGENT_KEY in the same file. See Environment variables for every setting.

Upgrades

The stack installs the agent binary with the install script. To upgrade, run the script again from a shell on the VM. It replaces the binary, restarts the service, and keeps the key and your settings:
To install a given release, add -s -- --version <X.Y.Z> after sh.

Remove

In Resource Manager, open the stack and choose Destroy, then confirm. When the destroy job succeeds, choose More actions, Delete stack. With Terraform, run terraform destroy with the same variables. Delete the agent in Observer (Agents) too if you no longer need it.