Command reference
infrality-agent [--config <path>] <command> [flags]Global flag
Section titled “Global flag”| Flag | Description |
|---|---|
--config <path> |
Read this config.yaml instead of searching for one. Settings chosen on the dashboard are written back here. |
daemon
Section titled “daemon”infrality-agent daemonWhat 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.
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. |
config
Section titled “config”infrality-agent configWrites 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.
Exit and restart behaviour
Section titled “Exit and restart behaviour”| 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:
journalctl -u infrality-agent -fA host that did not answer is logged at DEBUG, not WARN: on a /24 with twelve devices that is 242 lines nobody needs.