Skip to main content

Diagrams based on Netbox Devices and Circuits

Project description

NetBox Diagram

Automatically generated, up-to-date network diagrams from NetBox

CI Status Test Coverage Supported Python Version Supported NetBox Versions License: AGPL v3

📑 Table of Contents


Overview

netbox_diagram is a plugin for NetBox that enables the creation and management of network diagrams using NetBox devices and circuits. It renders physical and logical interconnections (e.g., cables, circuits) between devices based on their coordinates and metadata.

Key Features

  • Group devices into diagrams
  • Automatically render cables and circuits
  • Position devices using X/Y coordinates
  • Asynchronous updates for fast performance
  • Toggle grid and link labels for clarity

Limitations:

  • No support for virtual machines
  • Power connections and patch panels are not visualized

For more advanced or flexible diagramming, consider:


🔧 Installation

1. Install via pip

pip install netbox_diagram

2. Enable the plugin in configuration.py

PLUGINS = [
    'netbox_diagram',
    # other plugins...
]

3. Apply migrations and collect static files

python3 manage.py migrate
python3 manage.py collectstatic

4. Restart NetBox

sudo systemctl restart netbox

🚀 Quick Demo

Want to try it out quickly? Use the provided demo script to set up a sample environment. A running Netbox instance is required though!

This will:

  • Create 5 devices
  • Connect 2 devices via a circuit
  • Simulate patch panels via front-back port connections
  • Connect 4 devices to one central device
  • Generate a diagram including all devices

Run the demo

📌 Requires a running NetBox instance with API access enabled.

Update NETBOX_HOST and API_TOKEN to match your environment. (it obviously should point to your Netbox and use a API Token you've generated). The script itself has no external dependencies, you can run it straight away.

export NETBOX_HOST="172.16.123.1:8001"
export API_TOKEN="your_token_here"
python3 setup_demo.py

📸 Screenshots

Diagram overview with name, description, and associated objects:
Diagram Overview

Final generated diagram (patch panels not shown):
Final Diagram

Diagram with link labels disabled:
Diagram No Labels

Diagram with grid enabled:
Diagram with Grid

New "Diagrams" tab on Device and Circuit detail pages: Device Diagram Tab

Circuit Diagram Tab

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netbox_diagram-0.0.1.tar.gz (30.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netbox_diagram-0.0.1-py3-none-any.whl (37.5 kB view details)

Uploaded Python 3

File details

Details for the file netbox_diagram-0.0.1.tar.gz.

File metadata

  • Download URL: netbox_diagram-0.0.1.tar.gz
  • Upload date:
  • Size: 30.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for netbox_diagram-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c75cdf5040966ad0cb9fbd3570de97302d532fea3a9ac5070c54d895fe6e1596
MD5 1f8da4f211286466e51dc1056cb74bc6
BLAKE2b-256 d4ed88b5b7ae4201eb07814e10ca548676122db910bad2401e69900611969611

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_diagram-0.0.1.tar.gz:

Publisher: pypi.yml on netboxdiagram/netbox-diagram

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file netbox_diagram-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: netbox_diagram-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 37.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for netbox_diagram-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 94ae163812db050b05daba47eb3f4b5891a64dfc50b9b446319316e74cfac06c
MD5 b7279df90ab2f76c9e3ea41636612b6d
BLAKE2b-256 06f1bba5c564520ab0024805d719803f4361c0120eec2e0fef6fd61e1b46ca0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_diagram-0.0.1-py3-none-any.whl:

Publisher: pypi.yml on netboxdiagram/netbox-diagram

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page