Docs / Agent
Agent configuration
One YAML file, the same on every platform. Unknown keys are errors, and durations use Go syntax (10s, 1m, 5m).
The one-line installers write it for you: --central is central_url, --token-file enrollment_token, --tags tags, --ca-file ca_file, --insecure-http allow_insecure_http and --upgrade-url upgrade_url (on Windows -CentralUrl, -TokenFile and so on). They never replace an existing file without --force; edit it, then restart the agent.
Where the files are
| Platform | agent.yaml | State directory |
|---|---|---|
| Linux | /etc/uptight/agent.yaml | /var/lib/uptight-agent |
| macOS | /Library/Application Support/Uptight/agent.yaml | /Library/Application Support/Uptight/state |
| Windows | C:\ProgramData\Uptight\agent.yaml | C:\ProgramData\Uptight\state |
| FreeBSD | /usr/local/etc/uptight/agent.yaml | /var/db/uptight-agent |
run and test take -c path to use another file, and run also takes -log-file. On Windows, service install takes both. version takes neither.
The deb also reads an optional /etc/uptight/agent.env (root:root, 0600) under systemd: set UPTIGHT_ENROLLMENT_TOKEN, UPTIGHT_SECRET_* variables or HTTPS_PROXY there.
Rules for the files
- When the agent runs as root, agent.yaml, the secrets file and
ca_filemust be root-owned and not group- or world-writable. Otherwise the agent refuses them. - With no enrollment token, or a
ca_fileorsecrets_fileit cannot load, the agent exits with status 78 and stays stopped. The log names the key. - Tag keys
hostandagentare reserved.
Settings
| Key | Default | Meaning |
|---|---|---|
central_url | required | Central's base URL. Must be https:// unless allow_insecure_http: true. |
enrollment_token | required until enrolled | A token from central's agents.enrollment_tokens. UPTIGHT_ENROLLMENT_TOKEN overrides it. |
tags | none | Static tags such as role: web; they win over cloud tags and central's tag rules. |
state_dir | see above | Holds agent.key, the assignment and the result buffer. |
secrets_file | the platform's default secrets file, when it exists | Local secrets for ${secret:name} in checks central assigns. UPTIGHT_SECRET_<NAME> variables win. |
ca_file | none | Extra CA certificates (PEM) trusted for central. |
allow_insecure_http | false | Allow an http:// central. Labs only. |
discovery_interval | 60s | How often processes, disks and units are inventoried. |
observe_interval | 10s | How often the process and pm2 view used by the checks is refreshed. |
long_running | 5m | A Java or Node process enters the inventory only after running this long. So does a disk mounted while the agent runs, and a Docker container. |
aws_metadata | true | Read EC2 instance metadata for region, instance id and tags. |
auto_upgrade | true | Let central upgrade the agent: a deb install through apt, any other install by signed self-update. |
upgrade_url | the URL the agent was built with (AGENT_UPGRADE_URL), if any | Where a self-updating agent downloads signed releases from: <upgrade_url>/<version>/uptight-agent-<version>-<os>-<arch> and the same name plus .sig. Must be https:// unless allow_insecure_http: true. The signature decides what is installed, so any mirror will do. With neither this nor a built-in URL, the agent cannot update itself. Not used by deb installs. (0.10.0 or later.) |
report_packages | true | Report installed OS packages (dpkg on Ubuntu and Debian, the system closure on NixOS) so central can match them against vulnerability feeds (matching is Team). |
packages_interval | 1h | How often packages are read. At least 10m. |
containers | enabled: auto | Watch Docker containers (Linux, 0.10.0 or later). See below. |
remediation | off | Team Let central upgrade vulnerable packages on this host (Ubuntu and Debian deb installs, 0.10.0 or later). See below. |
probes | any host except link-local | Limits on the HTTP and TCP checks central asks this host to run: allow_hosts (empty: any host), allow_link_local, secret_hosts, allow_loopback. run_from probes may not reach loopback or the host's own addresses unless allow_loopback: true. |
Default secrets file
The agent reads its platform's secrets file when it exists, whatever -c says. secrets_file names another.
| Platform | Secrets file |
|---|---|
| Linux | /etc/uptight/secrets.yaml |
| macOS | /Library/Application Support/Uptight/secrets.yaml |
| Windows | C:\ProgramData\Uptight\secrets.yaml |
| FreeBSD | /usr/local/etc/uptight/secrets.yaml |
Docker containers
containers:
enabled: auto # auto (the default), true or false
auto: watch Docker on Linux when/var/run/docker.sockexists, is a socket (not a symlink), is owned by root with group root or docker, and is not world-writable. Report nothing otherwise.true: the same, but a missing or refused socket shows<host>:docker-daemondown with the reason.false: never connect to the socket. On a host with a qualifying socket, central retires the host's discovered container checks with the reasoncontainers turned off on the agent (containers.enabled: false), and removes<host>:docker-daemon.agent_checksentries of kindcontainerstay and report unknown until you change them.
The agent only reads from the socket (/_ping, /version, the container list and inspect, and past oom events). An inspect answer carries a container's environment, command and mounts; the agent drops them while decoding and never keeps, logs or sends them. It never reads DOCKER_HOST. Upgrade central first. Older agents reject the containers key. See Docker containers.
Vulnerability remediation Team
Off unless you turn it on here and central's vulnerability_remediation.enabled is true (in the config repository, git only; how to set it). Then Fix now on the Security page (or the automatic policy) can upgrade a vulnerable package on this host:
remediation:
enabled: true
packages: ["openssl", "libssl*"] # optional: only these (globs)
deny: ["postgresql*"] # optional: never these; wins over packages
allow_kernel: false # kernel packages (linux-*) only when true
Central sends package names and minimum versions only, never a command. The host upgrades only packages that are installed, to newer versions from its own apt sources, never removes or downgrades one, honors apt-mark hold and never reboots. Anything outside these lists is refused by the host, and central shows the reason. Older agents reject the remediation key. See how it runs on Linux, including the automatic policy (vulnerability_remediation.auto).
Behind a proxy
The agent honors HTTPS_PROXY and NO_PROXY. A proxy in front of central must allow request bodies of at least 14 MiB on /agent/v1/ and a read timeout over 45 seconds. When central is unreachable the agent keeps results on disk (up to 24 hours or 50 MiB, oldest dropped first) and sends them when it is back.