Skip to content

Installing the App in Nautobot

Here you will find detailed instructions on how to install and configure the App within your Nautobot environment.

Prerequisites

  • The app is compatible with Nautobot 3.0.0 and higher.
  • Databases supported: PostgreSQL, MySQL

Note

Please check the dedicated page for a full compatibility matrix and the deprecation policy.

Access Requirements

This App must be able to connect via SSH and SNMP to ranges of IP address in order to discover the devices within.

Install Guide

The app is distributed as a Python package (nautobot-device-discovery) which can be installed by Python package managers (e.g. pip, poetry, uv etc.) from an authorized private repository.

Important

Nautobot Device Discovery is commercial (licensed) software. To obtain access to the Network To Code private package repository, please contact us through the customer portal. Then review the instructions on how to set up the repository in your Python package manager of choice.

To ensure Device Discovery is automatically re-installed during future upgrades, create a file named local_requirements.txt (if not already existing) in the Nautobot root directory (alongside requirements.txt) and list the nautobot-device-discovery package:

echo nautobot-device-discovery >> local_requirements.txt

Once installed, the app needs to be enabled in your Nautobot configuration. The following block of code below shows the additional configuration required to be added to your nautobot_config.py file:

  • Append "nautobot_device_discovery" to the PLUGINS list.
  • Append the "nautobot_device_discovery" dictionary to the PLUGINS_CONFIG dictionary and override any defaults.
# In your nautobot_config.py
PLUGINS = ["nautobot_device_discovery"]

PLUGINS_CONFIG = {
    "nautobot_device_discovery": {
        # Number of IPs processed per SNMP engine cycle. See "App Settings" below.
        "snmp_engine_batch_size": 1000,
    },
}

App Settings

The following settings are supported under PLUGINS_CONFIG["nautobot_device_discovery"]. All settings are optional — defaults are applied when a key is omitted.

snmp_engine_batch_size

Default 1000
Type int
Applies to SNMP discovery (detect and collect phases)

Controls how many IPs the SNMP poller processes before recycling its internal SnmpEngine. Each batch:

  1. Builds transport-target factories for that slice of the scan surface.
  2. Issues the autodetect / collect queries with snmp_concurrency in-flight at a time.
  3. Closes the engine dispatcher to release pysnmp's per-IP state before the next batch.

The value governs two things:

  • Peak memory during SNMP discovery. Transport-target partials and pysnmp engine state are bounded to roughly one batch at a time, so peak memory scales with snmp_engine_batch_size rather than with the total size of the scan surface. Lowering the value reduces peak memory on very large scans; raising it amortizes engine-recycle overhead over more IPs per cycle.
  • Effective concurrency. The SNMP poller's concurrency is limited by min(snmp_engine_batch_size, snmp_concurrency). If snmp_engine_batch_size is smaller than snmp_concurrency (set on the Discovery Job form), the batch size becomes the limiter and the configured concurrency is not reached. As a general rule, keep snmp_engine_batch_size ≥ snmp_concurrency.

Tuning guidance

Scenario Suggested value
Small scans (≤ /22) The default 1000 is sufficient; the batching path is effectively a single batch.
Medium scans (/16) 5002000. Default is a reasonable starting point.
Large scans (multiple /16s or /12-scale) Keep at 1000 or lower; the gains from batching are most pronounced here.
Memory-constrained workers Lower to 250500 to further cap peak memory, at the cost of more frequent engine recycles.
CPU-bound workers with ample RAM Raise to 20005000 to reduce engine-recycle overhead.

Edge cases

  • 0 (or any non-positive value): disables batching. The poller processes the entire scan surface in one pass and does not recycle the engine. Use only for small scans; peak memory will scale linearly with scan-surface size.
  • A value greater than the scan surface: the poller falls back to single-batch behavior for that run (no recycle), equivalent to 0.

Once the Nautobot configuration is updated, run the Post Upgrade command (nautobot-server post_upgrade) to run migrations and clear any cache:

nautobot-server post_upgrade

Then restart (if necessary) the Nautobot services which may include:

  • Nautobot
  • Nautobot Workers
  • Nautobot Scheduler
sudo systemctl restart nautobot nautobot-worker nautobot-scheduler