What the stack creates
- A VM
observer-agent: Ubuntu 24.04, shapeVM.Standard.A1.Flexby 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 listobserver-agent-outbound-only, which allows no inbound traffic.
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.Deploy with Terraform
The stack is plain Terraform. With the Terraform CLI and an OCI CLI profile in~/.oci/config:
-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’slogs output:
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:
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:-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, runterraform destroy with the same
variables. Delete the agent in Observer (Agents) too if you no
longer need it.
