DOCS AssetTrakr

How-to: discover your network

Seed your inventory from a subnet scan instead of typing it in.

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

  1. Create an API key under Settings → API Keys.
  2. Download layer8-discover.mjs onto a machine inside the network segment (Node 18+, no dependencies).
  3. Preview first:
node layer8-discover.mjs --subnet 192.168.1.0/24 --dry-run
  1. 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 -an when the scanner shares the segment.
  • Creates only — it never updates or deletes existing assets. Review the discovered tag 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 --location so discovered assets land pre-sorted for the By location view.