Skip to content

NetBox plugin

Shin Sterneck edited this page Nov 21, 2026 · 3 revisions

The NetBox plugin (NetBox 4.5 to 4.7) puts the Stratagram editor on every site's Diagram tab.

  • The site is drawn from its devices, cables, circuits and patch panels, with a sheet for each location, also shown on the location's own Diagram tab.
  • Each type of device is on a layer of its own, and each device on a sub-layer under its type's, to show or hide them by type or one by one.
  • Each location is a layer too, with the locations inside it and its devices' layers by type under it. Its background, in a color of its own with a dotted border a shade darker, makes it a tinted area on the drawing that holds its devices, the locations inside it nested in it. A device moved to another location in NetBox moves to that location's layer at the next refresh.
  • The diagram is saved in NetBox and refreshed from it later without moving what you arranged.
  • Refresh from NetBox asks what to bring in: a tree like the layer list (locations, device types, devices, their interfaces), nothing selected at first. Checking an entry takes everything under it; the site at the top takes everything, which is the full refresh. Choose Update this sheet or Add as a new sheet; a new sheet is laid out and shown right away.
  • The data comes from NetBox's own models, filtered by each user's object permissions, with no API tokens. Viewing, adding and changing site diagrams are NetBox permissions of their own.
  • The editor follows NetBox's light/dark switch until you pick a theme.

Install

sudo /opt/netbox/venv/bin/pip install netbox-stratagram

With netbox-docker, add netbox-stratagram to plugin_requirements.txt instead. Then enable it in configuration.py:

PLUGINS = ["netbox_stratagram"]

and run NetBox's migrations and collectstatic.

The settings (PLUGINS_CONFIG: device types by role, which devices are drawn, layers by type and by location, line routing, which devices show their front ports) are described in the plugin's README, which is also its page on PyPI.

How NetBox's patch panels, front and rear ports and interfaces are drawn is described in Device types and front panels.

Clone this wiki locally