Skip to content

Connect it to your organization

An installed agent knows nothing yet: not which organization it belongs to, nor which board to draw on. Two values tell it — an API key and, optionally, a board id.

In the dashboard, open your organization’s API keys section and create one. Only admins can, unless the organization’s policy restricts it to owners. The key (nk_…) is shown once — copy it now. It is bound to the first agent that registers with it, which is what you want for one machine. See API keys.

Open the board the agent should draw on. Its id is in the address: https://app.infrality.io/<board-id>/edit. It must be a board of the same organization as the key, not in the trash.

You can also leave this out and choose the board later in the agent’s settings on the dashboard.

The installer and the packages put the file at /etc/infrality-agent/config.yaml, readable by the service account only.

Terminal window
sudo infrality-agent config # if the file does not exist yet
sudo nano /etc/infrality-agent/config.yaml

The two lines that matter:

config.yaml
ingestor:
api_key: "nk_your_key_here"
base_url: "https://api.infrality.io"
project_id: "the-board-id" # optional: can be chosen on the dashboard

The range defaults to the network the machine is on. Set scan.cidr and scan.mask only to sweep something else. Every other key is in the configuration reference.

Terminal window
sudo systemctl enable --now infrality-agent
journalctl -u infrality-agent -f # watch it register

It registers, connects, and appears online in the organization’s Agents within a few seconds.

Press Scan on the agent in the dashboard. Hosts appear on its board as each is identified, and the run is listed with its progress and outcome.

If the board stays empty after a sweep, the agent may not be attributed to it. The API refuses a board the key does not entitle the agent to — another organization’s, a personal board, one in the trash, or an id that names nothing — and says so. The agent logs it at start-up, before anything else:

WARN the API refused part of this agent's configuration warning="The board … named in this agent's config was refused: …. Nothing this agent finds will be attributed to it."

Fix the id, or choose the board in the agent’s settings on the dashboard. Once a board has been chosen there, the dashboard decides and the project_id in the file is ignored — the agent logs that too. See troubleshooting.

Any key can come from the environment: INFRALITY_ plus the key in capitals, with . as _. Useful in a container or with a secret manager, so the API key is never written to disk:

Terminal window
INFRALITY_INGESTOR_API_KEY=nk_… INFRALITY_INGESTOR_PROJECT_ID=… infrality-agent daemon