Skip to main content

Network Discovery

Network discovery finds what is on a customer's network: the printer nobody mentioned, the switch that was never added to monitoring, the laptop somebody plugged in last week. An agent on a host in the network scans it, and every device that answers is listed under Infrastructure → Network discovery, with what could be learned about it and what you can do next.

A scan only reads. It sends pings and short connection attempts, reads the host's ARP table and asks devices for their name. It changes nothing on them and tries no passwords.

What a scan does​

A scan is a job of type discovery.scan, so it follows every rule in Jobs: it is signed, it is permission-checked, it waits for approval where the customer asks for it, and it is in the audit log. The host runs it only if the actions list in its config.yaml contains discovery; see Agent Installation.

StepWhat it does
NetworksThe host's own networks (private IPv4 addresses only; Docker, VPN and other virtual interfaces are left out), plus the extra networks set for the host. Each network is cut down to a /22 (1,024 addresses), at most 4,096 addresses and 16 networks in all. Anything else is listed in the result as skipped, with the reason.
SweepAn ICMP echo to every address, and a TCP connection attempt to ports 22, 80, 443 and 445. Any answer, even a refusal, means a device is there. The host's ARP table adds the devices it has talked to.
PortsFor each device that answered, a TCP connection attempt to 22, 25, 53, 80, 139, 443, 445, 631, 3306, 3389, 5000, 5001, 5432, 5900, 8006, 8007, 8080, 8443 and 9100.
SNMPIf the host's configuration names communities (below), each device is asked for sysDescr and sysName over SNMP v2c. A device that answers is listed with port 161.
NamesReverse DNS first, then mDNS, then NetBIOS. The first that answers names the device; an SNMP sysName fills in what none of them knew.
VendorFrom the hardware address, looked up in a table built into the agent.
TypeA guess from the vendor, the name, the SNMP description and the open ports: computer, server, hypervisor, storage, network device, printer, camera, smart device or unknown. It is a hint for sorting the list, not a fact.

A scan is rate-limited (500 probes a second at most, 96 in flight) and has a time budget of five minutes. When the budget runs out the scan ends with what it has found and the result is marked Incomplete. A host that cannot send ICMP (an agent that does not run as root on Linux) sweeps with TCP and ARP only; the result is marked Limited sweep, because devices that answer neither may be missed.

A result that is too large for a job to carry leaves out the devices that say least (no open port, no name, no hardware address); the number left out is shown beside the scan.

SNMP communities​

The communities a scan tries live in the host's config.yaml, not in the dashboard, so that they never travel in a job:

actions: [discovery]
discovery:
snmp_communities:
- monitoring

Without any community the scan does not ask over SNMP. Use a read-only community; a scan only sends get requests for two objects.

The vendor table​

The vendor names come from agent/internal/discovery/oui.tsv, a subset of the IEEE MA-L registry (https://standards-oui.ieee.org/oui/oui.txt) holding the vendors whose hardware turns up on small business networks: network gear, printers, storage, hypervisors and virtual network cards, single-board computers, phones and cameras. A prefix that is not in the table only leaves the vendor column empty. To add a vendor, add a line (AABBCC, a tab, the name) and release a new agent.

Scanning​

Scan now​

Scan now at the top of the page lists the hosts that can scan, grouped by customer, and starts a scan on the one you choose. Doing so needs the script.run permission for the customer, the same as running a script; a customer that requires approval for every job gets the approval step first. The scan appears in the host's Jobs tab with its output.

Every day​

On the Scanners tab, tick Every day for the hosts that should scan on a schedule. Choose one host per site: ten servers on one network would each sweep it every day for the same result. The dashboard starts the scan when the host has not scanned for 24 hours, checked every ten minutes by the cron call that also evaluates alerts (see Installation); a scheduled scan that cannot start because the host is offline is dropped after twelve hours and tried again at the next check.

A daily scan is skipped, without a message, in three cases:

  • the customer's Daily scans setting is off (it is on by default);
  • the customer requires approval for every job, because a schedule cannot wait for a second person every night and must not get around the customer's own rule. Such a customer scans when somebody asks;
  • the host's agent does not allow the discovery action.

Extra networks​

A host scans the networks it is attached to. To reach one it is not attached to, but can route to, use Edit networks on the host's row and add it as 10.20.0.0/24. Only private IPv4 ranges are accepted, at most eight per host. Devices in a routed network have no hardware address in the scan (the host sees only the router's), so they are told apart by address and by the host that found them.

The list of devices​

Each row is a device, kept from scan to scan. Two scans find the same device when its hardware address is the same, so a device that gets a new address from DHCP stays one row; devices without a hardware address are matched by address behind the same host. A hardware address that turns up on several addresses of one scan (a router answering for the hosts behind it, a machine with several addresses) belongs to the first of them.

A device is New until somebody has looked at it, Known or Ignored after that. Only you change that; a scan never does, and an ignored device that is still on the network stays ignored. A device that is already monitored as an SNMP device (its address is that of a device polled by one of the customer's hosts) starts as Known and shows the host it is.

The search finds addresses, hardware addresses, vendors, names and SNMP descriptions. The filters narrow by customer, status and type.

What you can do with a device​

ActionWhat it does
Add as SNMP deviceOpens the form of an SNMP device with the name and address filled in, polled by the host that found it. Saving it links the discovery row to the new host. Needs the manager role.
Add as tunnel targetMakes a named target for remote access, reached through the host that found the device. The port is one of the open ones, with the most likely preselected (a remote desktop before a shell before a web page). The agent's own tunnel.allow list must contain the network, or the tunnel is refused when it is opened. Needs the manager role.
Mark as known, Ignore, Mark as newSets the status. Needs the operator role.
Remove from listForgets the device. If it is still on the network the next scan finds it again as new. Needs the manager role.

Everything done here is in the audit log.

New devices​

When a scan finds a device it has not seen before, the dashboard records the event New device discovered on the timeline of the host that found it, and sends the webhook device.discovered. Neither needs a setting.

Notifications are off until you want them: on the Scanners tab, tick Notify about new devices for a customer, and the same recipients as for alerts (the mail address of every account that reaches the customer, and the notification channels) are told. Event rules never send this event; the setting is the only switch.

To keep a first scan from sending hundreds of messages:

  • the first scan of a customer is a baseline. Its devices are listed as new, for you to go through, but no event, webhook or notification is sent;
  • after that, at most 25 devices per scan are announced. A scan that finds more (a new site plugged in) lists them all and announces the first 25.

Permissions and privacy​

  • The page and its data are not shown in customer view: a map of a customer's network is for the team that works on it.
  • Who sees which devices follows the customers an account reaches, like everything else.
  • Starting a scan needs script.run; changing the settings, SNMP devices and tunnel targets needs the manager role.
  • The list is live. A scan that ends, a status somebody sets and a setting somebody changes appear on every open screen without reloading.

What it does not do​

Topology (which switch port a device hangs off, LLDP and CDP) is not collected, nor are IPv6 networks, public address space or hosts the agent cannot route to. A device that answers nothing at all, not even ARP, is not found.