Discovery
How Structam finds addresses that are not known hosts: NetBox, agents' neighbour tables and TCP connect sweeps of ranges you add. Discovery never creates a host.
On this page
Status. Tested: neighbour folding, endpoint matching and lifecycle, the target checks, sweeps (connect probes, banners, TLS certificates and SSH host keys against listeners the tests start), checkpoints and resumption, and the proposals from NetBox prefixes, in the product's package tests on PostgreSQL. Not yet run: a sweep of a real network.
Structam finds hosts three ways:
| Source | What | Runs |
|---|---|---|
| NetBox | every device and virtual machine | the NetBox sync (NetBox) |
| Agents' neighbour tables | addresses their hosts talk to (the ARP and neighbour cache) | with every inventory |
| Agentless sweeps | TCP connect probes of ranges an administrator added | only for those ranges, on a schedule or on demand |
Everything found that is not a known host is listed on Discovery as an endpoint, so you can onboard it or add it to NetBox. Discovery never creates a host, and it does not inventory software without an agent: there are no SNMP, ICMP or credentialed scans.
Endpoints
Each discovered address is an endpoint with a state:
| State | Meaning |
|---|---|
new | no host owns the address |
matched | exactly one active host owns it (NetBox primary IP, a NetBox interface address, or a live agent's address) and it has no live agent |
onboarded | that host has a live agent |
ignored | set by an operator (audited); kept as a tombstone through retention |
- An address several hosts own matches nothing.
- Endpoints not seen for
STRUCTAM_DISCOVERY_RETENTION_DAYS(90) are deleted, except ignored ones. - Unmatched endpoints are visible only to users with an unscoped
viewgrant; matched ones follow the host's scope. - A
newendpoint whose address no active NetBox host holds is also reported as NetBox driftip.not_in_netbox. Addresses in the Docker and Podman default bridges (172.17.0.0/16, 10.88.0.0/16) and ignored endpoints never are.
Neighbour tables only ever create endpoint rows, never hosts, and never change a match that a host's own NetBox or agent data decides. Loopback, link-local, multicast and unspecified addresses are dropped, and at most 4 096 entries per host are kept. They are folded into endpoints every minute, and every endpoint is re-matched every 15 minutes.
Sweeps
Only ranges an administrator adds as targets are ever swept (Discovery → Sweep targets, permission integrations.manage; every change is audited).
| Field | |
|---|---|
| CIDR | at most /16 (IPv4) or /112 (IPv6); loopback, link-local, multicast, reserved and cloud-metadata ranges are refused |
| Rate | probes per second, capped by STRUCTAM_DISCOVERY_MAX_RATE (500) |
| Schedule | an interval, or empty for on demand (Sweep now) |
| Enabled |
A sweep is a job on the discovery worker pool, one at a time per target. It sends TCP connect probes to ports 22, 80, 443, 445, 3389, 5985, 5986 and 8443 of every address at the target's rate, each with a 1.5 s connect timeout and at most 256 in flight, and looks up reverse DNS. For open ports only, and never with credentials, it also records:
- the server's first line (banner);
- the TLS leaf certificate (SHA-256, subject, issuer, names, expiry; not verified);
- the SSH host key fingerprint (the key exchange is abandoned before any authentication).
What remote services answer is stored size-limited and shown as data. A sweep checkpoints every 256 addresses, so a node that stops mid-sweep loses nothing: another node resumes it. Editing a target's range during a sweep ends that sweep as partial. Each finished sweep is listed on Discovery → Sweeps and audited as discovery.sweep.
Caution. A sweep sends packets to every address of a range from the node that runs it. Tell your network and security teams before you add a target, and give it a rate the network tolerates.
Settings
The saved Integrations → Discovery setting replaces these.
| Variable | Default | |
|---|---|---|
STRUCTAM_DISCOVERY_SWEEPS | on | off stops every sweep; neighbour tables are still folded |
STRUCTAM_DISCOVERY_CONNECT_TIMEOUT | 1500ms | 100ms to 10s |
STRUCTAM_DISCOVERY_MAX_RATE | 500 | caps every target's rate |
STRUCTAM_DISCOVERY_CONCURRENCY | 256 | probes in flight per sweep |
STRUCTAM_DISCOVERY_REVERSE_DNS | on | |
STRUCTAM_DISCOVERY_FINGERPRINTS | on | banners, TLS certificates, SSH host keys |
STRUCTAM_DISCOVERY_RETENTION_DAYS | 90 |
Proposals from NetBox
NetBox prefixes tagged structam-discover are listed under Discovery → Proposed prefixes. A proposal is never swept until someone adds it as a target.
Questions the docs do not answer?
Ask the people who build Structam. Installation media and licences come from KazLabs.