The discovery script sweeps a subnet from any machine on your network and pushes every
host that answers into AssetTrakr — names from reverse DNS, MAC addresses from the
neighbor table, device types guessed from hostnames, everything tagged discovered
for easy review.
Run it
- Create an API key under Settings → API Keys.
- Download
layer8-discover.mjsonto a machine inside the network segment (Node 18+, no dependencies). - Preview first:
node layer8-discover.mjs --subnet 192.168.1.0/24 --dry-run
- Then push for real:
node layer8-discover.mjs --subnet 192.168.1.0/24 \
--api-key l8k_your_key --url https://layer8systems.ca --location "HQ"
What it does (and doesn't)
- ICMP sweep with the system
ping, 64 hosts at a time, capped at a /20. - Reverse DNS for names; hostname patterns set the device type
(
sw-→ switch,fw-→ firewall,nas-→ storage, …). - MACs from
ip neigh/arp -anwhen the scanner shares the segment. - Creates only — it never updates or deletes existing assets. Review the
discoveredtag afterwards, rename what matters, delete the noise. - Hosts that filter ICMP won't appear; run it from a machine with broad reachability (a jump box or the hypervisor host works well).
Tip: re-run per site with a different
--locationso discovered assets land pre-sorted for the By location view.