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:
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 thePLUGINSlist. - Append the
"nautobot_device_discovery"dictionary to thePLUGINS_CONFIGdictionary 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:
- Builds transport-target factories for that slice of the scan surface.
- Issues the autodetect / collect queries with
snmp_concurrencyin-flight at a time. - 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_sizerather 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). Ifsnmp_engine_batch_sizeis smaller thansnmp_concurrency(set on the Discovery Job form), the batch size becomes the limiter and the configured concurrency is not reached. As a general rule, keepsnmp_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) | 500–2000. 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 250–500 to further cap peak memory, at the cost of more frequent engine recycles. |
| CPU-bound workers with ample RAM | Raise to 2000–5000 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:
Then restart (if necessary) the Nautobot services which may include:
- Nautobot
- Nautobot Workers
- Nautobot Scheduler