Skip to content

Command reference

infrality-agent [--config <path>] <command> [flags]
Flag Description
--config <path> Read this config.yaml instead of searching for one. Settings chosen on the dashboard are written back here.
Terminal window
infrality-agent daemon

What the installed service runs. Registers, connects, stays online, and sweeps only when the dashboard asks — it never sweeps on a timer, whatever scan.interval says. Exits if the API rejects the key (HTTP 401 or 403); keeps retrying if the API is only unreachable.

Terminal window
infrality-agent run [--once] [--no-scan] [--interface <name>]

Registers, connects, and sweeps every scan.interval if one is set; otherwise waits for the dashboard, like daemon.

Flag Description
--once One sweep, then exit. For cron, a smoke test, or a network you visit once. Serves no metrics.
--no-scan Stay connected without the timer; sweep only when asked.
--interface <name> Sweep from this interface, e.g. eth0. Needed only for a segment this machine has no address on. Same as scan.interface.
Terminal window
infrality-agent config

Writes a starting config.yaml: into /etc/infrality-agent/ when run as root, into the working directory otherwise. The range in it is the network this machine is on.

Situation What happens
config.yaml cannot be parsed Exits, naming the file. It used to start on defaults and sweep the wrong range.
The API rejects the key (401 / 403) Exits, naming the key’s URL. Waiting would not fix a typo or a revoked key.
The API cannot be reached Keeps running, retrying before every sweep and reconnecting with backoff.
The agent was deleted on the dashboard The live channel closes it with unknown_agent; it registers again.

Under systemd an exit is restarted by the unit, so a rejected key shows in journalctl -u infrality-agent as the same error, repeated.

The agent logs to standard output — the journal under systemd:

Terminal window
journalctl -u infrality-agent -f

A host that did not answer is logged at DEBUG, not WARN: on a /24 with twelve devices that is 242 lines nobody needs.