AGENT_KEY it asks for the key on the terminal and hides what
you type. To pass flags, add -s --:
What it does
- Picks the binary for the machine: Linux x86_64 or ARM64, macOS Apple silicon or Intel. Anything else exits with code 2; run the agent with Docker there.
-
Downloads the binary and
SHA256SUMS.txtfrom the agent’s GitHub release (withcurl, orwgetwhencurlis missing) and checks the binary’s SHA-256. On a mismatch it stops before writing anything. -
Installs the binary to
/usr/local/bin/observer-agent. -
On Linux with systemd:
- creates the system user
observer-agent; - writes
/etc/observer-agent/agent.env(mode 0600, readable by root only) withAGENT_KEY,CLOUD_SERVER_URLandBUFFER_PATH=/var/lib/observer-agent/observer-agent-buffer.db; - writes
/etc/systemd/system/observer-agent.serviceand starts it.
sudo: it callssudofor the steps that need root. - creates the system user
-
On macOS: clears the quarantine flag on the binary, writes the
LaunchAgent
~/Library/LaunchAgents/use.observer.agent.plist(mode 0600) and loads it. It starts at login and restarts if it exits. Logs go to~/Library/Logs/observer-agent.log. Run the script as yourself, not withsudo; it asks for your password when it needs root to install the binary. -
On Linux without systemd (Alpine, most containers): installs the
binary and prints the command to run it. On Alpine, install
gcompatfirst (apk add gcompat libstdc++): the binary is built against glibc.
Flags
Upgrades
Run the same command again. It replaces the binary and restarts the service. WithoutAGENT_KEY it keeps the existing agent.env (or plist) as it
is, with the key, the Observer address and any variables you added.
With AGENT_KEY it writes the file again with only the key, the
Observer address and, on Linux, BUFFER_PATH: add your other
variables again afterwards. --cloud-url only takes effect when the
file is written, so pass it together with AGENT_KEY.
Settings
On Linux, add environment variables, such asPROMETHEUS_SERVER_URL or the secrets that probes reference by
name, to /etc/observer-agent/agent.env, then restart:
EnvironmentVariables and load it
again, as in
Install from a release binary.
Logs
- Linux:
journalctl -u observer-agent -f - macOS:
tail -f ~/Library/Logs/observer-agent.log

