Host Discovery
Running Discovery
Section titled “Running Discovery”# Standard discoverysonar-catalog discover
# Deep discovery (SSH into hosts to find remote mounts)sonar-catalog discover --deepDiscovery Methods
Section titled “Discovery Methods”1. Autofs Maps (primary)
Section titled “1. Autofs Maps (primary)”Parses fully resolved autofs maps from automount -m. Falls back to reading /etc/auto.master and referenced map files directly.
# What sonar-catalog reads:automount -m2. Showmount
Section titled “2. Showmount”Queries known NFS servers for their exports:
showmount -e sonar-server-01# /export/survey (everyone)# /export/data 192.168.1.0/243. IP Neighbor (ARP)
Section titled “3. IP Neighbor (ARP)”Reads the kernel ARP table to find recently-contacted hosts:
ip neigh# 192.168.1.10 dev eth0 lladdr aa:bb:cc:dd:ee:ff REACHABLE4. Subnet Scan (optional)
Section titled “4. Subnet Scan (optional)”Probes TCP port 22 across configured subnets. Disabled by default — enable in config:
{ "discovery": { "use_subnet_scan": true, "scan_subnets": ["192.168.1.0/24", "10.0.0.0/16"] }}Filtering Hosts
Section titled “Filtering Hosts”Hostname patterns
Section titled “Hostname patterns”Only discover hosts matching glob patterns:
{ "discovery": { "hostname_patterns": ["sonar-*", "nas-*", "ss-*"] }}Blacklist
Section titled “Blacklist”Never discover or crawl these hosts:
{ "discovery": { "host_blacklist": ["192.168.1.1", "gateway"] }}Whitelist
Section titled “Whitelist”Only these hosts are allowed (overrides pattern matching):
{ "discovery": { "host_whitelist": ["sonar-01", "sonar-02", "nas-backup"] }}SSH Configuration
Section titled “SSH Configuration”| Field | Default | Description |
|---|---|---|
ssh_user | "xyz" | Username for SSH probes |
ssh_timeout | 3 | Connection timeout (seconds) |
ssh_auth_method | "key" | "key", "sshpass_file", or "sshpass_env" |
ssh_key_path | null | Path to SSH private key (uses ssh-agent if null) |
ssh_host_key_policy | "accept-new" | "accept-new", "no", or "yes" |
Deep Discovery
Section titled “Deep Discovery”With --deep, the discovery engine SSHes into each accessible host and runs mount discovery remotely — finding NFS mounts that aren’t visible from the local machine.
sonar-catalog discover --deepListing Discovered Hosts
Section titled “Listing Discovered Hosts”sonar-catalog hostssonar-catalog hosts --output json