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:

SourceWhatRuns
NetBoxevery device and virtual machinethe NetBox sync (NetBox)
Agents' neighbour tablesaddresses their hosts talk to (the ARP and neighbour cache)with every inventory
Agentless sweepsTCP connect probes of ranges an administrator addedonly 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:

StateMeaning
newno host owns the address
matchedexactly one active host owns it (NetBox primary IP, a NetBox interface address, or a live agent's address) and it has no live agent
onboardedthat host has a live agent
ignoredset 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 view grant; matched ones follow the host's scope.
  • A new endpoint whose address no active NetBox host holds is also reported as NetBox drift ip.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
CIDRat most /16 (IPv4) or /112 (IPv6); loopback, link-local, multicast, reserved and cloud-metadata ranges are refused
Rateprobes per second, capped by STRUCTAM_DISCOVERY_MAX_RATE (500)
Schedulean 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.

VariableDefault
STRUCTAM_DISCOVERY_SWEEPSonoff stops every sweep; neighbour tables are still folded
STRUCTAM_DISCOVERY_CONNECT_TIMEOUT1500ms100ms to 10s
STRUCTAM_DISCOVERY_MAX_RATE500caps every target's rate
STRUCTAM_DISCOVERY_CONCURRENCY256probes in flight per sweep
STRUCTAM_DISCOVERY_REVERSE_DNSon
STRUCTAM_DISCOVERY_FINGERPRINTSonbanners, TLS certificates, SSH host keys
STRUCTAM_DISCOVERY_RETENTION_DAYS90

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.

Talk to us