Docs / Agent
Install the agent on FreeBSD
An rc.d script runs the agent under daemon(8), which restarts it if it exits. Builds: freebsd-amd64 and freebsd-arm64.
One-line install
As root, with central's enrollment token in a file only root can read:
fetch -o - https://uptight.io/install-agent.sh | sh -s -- \
--central https://uptight.example.com --token-file /root/uptight-enroll.token
It downloads the agent, refuses it unless its SHA-256 is the release's, installs it with the rc.d script, writes /usr/local/etc/uptight/agent.yaml (mode 0600), enables it with sysrc and starts it. The options are the same as on Linux.
By hand
Download uptight-agent-<version>-freebsd-<arch> and the rc.d script, and check them:
V=0.14.0
fetch https://downloads.uptight.io/uptight-agent/$V/uptight-agent-$V-freebsd-amd64
fetch https://downloads.uptight.io/uptight/$V/uptight_agent
install -m 0755 uptight-agent-$V-freebsd-amd64 /usr/local/bin/uptight-agent
install -m 0555 uptight_agent /usr/local/etc/rc.d/uptight_agent
mkdir -p /usr/local/etc/uptight && chmod 0700 /usr/local/etc/uptight
Create /usr/local/etc/uptight/agent.yaml with central_url and enrollment_token, then:
sysrc uptight_agent_enable=YES
service uptight_agent start
uptight_agent_config and uptight_agent_logfile in rc.conf change its paths. Release binaries update themselves; one you build yourself does so only when built with your own release key (make release-agents).
Files
| What | Where |
|---|---|
| Config | /usr/local/etc/uptight/agent.yaml |
| State (key, buffer) | /var/db/uptight-agent |
| Log | /var/log/uptight-agent.log |
| Standard output and error (crashes before logging starts) | /var/log/uptight-agent.log.out |
What it watches on FreeBSD
- CPU, memory and disk IO, UFS filesystems (space and inodes) and ZFS (space only), and long-running Java and Node processes.
- The agent id comes from the host's
kern.hostuuid.
Not on FreeBSD: systemd units, pm2 apps and package reports. After a config error the agent exits and daemon(8) keeps restarting it every 10 seconds; fix agent.yaml and run service uptight_agent restart.
Automatic upgrades
Central decides when the agent upgrades (Upgrade now in Settings → Fleet, or agent upgrade rings Team), and the order carries only a version number. The agent then upgrades itself by signed self-update:
- It downloads that version for FreeBSD and your architecture, over HTTPS.
- It checks the release's Ed25519 signature against the release key built into the agent, and the binary's checksum. Anything else is refused, and so is any version not newer than the one running.
- Before the swap it runs the verified binary once as
uptight-agent selftestwith your agent.yaml: the new version starts up as far as it can without contacting anything or writing anything. A release that does not start on this host (say one built for a newer FreeBSD) or that would refuse your agent.yaml is refused, and the running version stays. - It swaps the new binary in at
/usr/local/bin/uptight-agent, keeping the old one asuptight-agent.previous, and exits. daemon(8) starts the new one 10 seconds later. - The new version must reach central within 10 minutes. If it cannot, keeps crashing after it starts, or refuses agent.yaml, the previous binary is put back and Fleet shows rolled back. Only a binary that passed step 3 and still dies on every start before it gets that far (something the trial run could not reproduce) is not rolled back: rename
uptight-agent.previousback by hand.
Central can only choose among releases signed with the offline release key, so it cannot make the host run anything else. It is on by default for agents built with a release key, when the agent runs under the rc.d script's daemon(8). Opt out with auto_upgrade: false in agent.yaml. uptight-agent test prints whether it works on this host, and if not, why. Run from a shell it cannot check that daemon(8) runs the agent; Fleet shows the running agent's own answer.
A self-updating agent downloads <upgrade_url>/<version>/uptight-agent-<version>-freebsd-<arch> and the same name plus .sig. upgrade_url in agent.yaml wins over the URL the agent was built with (AGENT_UPGRADE_URL). Fleet shows manual, with the reason, when:
this build has no release key: install an agent built bymake release-agents.no upgrade_url is set and this build has none built in: setupgrade_urlin agent.yaml.not run by a service manager that restarts it (…): run it from the rc.d script, under daemon(8).
A version that failed is not retried on that host for an hour. See an upgrade failed or rolled back.
Check it worked
Within a minute the host appears in the web UI under Inventory and on the dashboard, with CPU, memory, IO and disk checks. Java and Node processes that have run for 5 minutes (long_running) get checks of their own, named <host>:<kind>:<identity>. FreeBSD has no systemd units, so nothing waits under Discovered for approval. If it does not show up, see the agent does not show up.