Skip to main content

NetBox Plugin for viewing interfaces in a grid layout with VLAN color-coding

Project description

netbox-plugin-interface-view

NetBox Plugin for viewing device interfaces in a stylish grid layout that mimics the physical port arrangement.

Features

  • Grid Visualization: Display device interfaces in a configurable grid layout (rows × columns)
  • Visual Connection Status: Color-coded indicators show interface connection and enabled status
  • VLAN Color-Coding: Interfaces are color-coded based on their VLAN assignments
    • Border color represents the untagged VLAN
    • Colored dots represent tagged VLANs
  • Interface Filtering: Filter out specific interface types (e.g., Virtual, LAG, Loopback)
  • Configurable Layout: Grid dimensions can be configured per device using custom fields

Installation

  1. Install the plugin:
pip install netbox-plugin-interface-view
  1. Add the plugin to your NetBox configuration (configuration.py):
PLUGINS = [
    'netbox_interface_view',
]
  1. Run database migrations:
cd /opt/netbox/netbox/
python3 manage.py migrate
  1. Restart NetBox services:
sudo systemctl restart netbox netbox-rq

Configuration

Custom Fields Setup

The plugin requires the following custom fields to be created in NetBox:

Device Custom Fields

  1. grid_rows (Integer)

    • Content Type: dcim > device
    • Type: Integer
    • Default: 2
    • Description: Number of rows in the interface grid
  2. grid_columns (Integer)

    • Content Type: dcim > device
    • Type: Integer
    • Default: 24
    • Description: Number of columns in the interface grid

VLAN Custom Fields

  1. color (Text)
    • Content Type: ipam > vlan
    • Type: Text
    • Default: #cccccc
    • Validation: Hex color code (e.g., #FF5733)
    • Description: Color to use for VLAN visualization (hex color code)

Creating Custom Fields via NetBox UI

  1. Navigate to Customization > Custom Fields
  2. Click Add to create a new custom field
  3. Fill in the details as specified above
  4. Save the custom field

Creating Custom Fields via API

You can also create custom fields programmatically using the NetBox API or Django shell.

Usage

  1. Navigate to a device detail page in NetBox
  2. Click the "View Interface Grid" button (appears in the device header)
  3. The grid visualization page will display:
    • A configurable grid of interface cells
    • Connection status indicators (green = connected, gray = disconnected, red = disabled)
    • VLAN color coding (border = untagged VLAN, dots = tagged VLANs)
    • Filter options to exclude specific interface types

Example Configuration

For a 48-port switch with ports arranged in 2 rows:

  • Set grid_rows = 2
  • Set grid_columns = 24

For a 24-port switch with ports arranged in 3 rows:

  • Set grid_rows = 3
  • Set grid_columns = 8

Legend

  • Green dot (●): Interface is connected and enabled
  • Gray dot (●): Interface is disconnected
  • Red dot (●): Interface is disabled
  • Border color: Represents the untagged VLAN color
  • Small colored dots: Represent tagged VLANs

Requirements

  • NetBox >= 3.5.0
  • Python >= 3.8

License

This project is licensed under the Apache 2.0 License.

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_interface_view-0.2.2.tar.gz (15.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_interface_view-0.2.2-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file netbox_interface_view-0.2.2.tar.gz.

File metadata

  • Download URL: netbox_interface_view-0.2.2.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for netbox_interface_view-0.2.2.tar.gz
Algorithm Hash digest
SHA256 27a5c77c6a0df98ed6d2abaedb4f21f691ea841935e66e582d73949ee5e6f7f8
MD5 6a373a680dfe8d3cc429531ad28e14d9
BLAKE2b-256 ea77ce0e74c549eb03322cae2be2f750a681ccbd26e955835d0dfb9affc66c18

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_interface_view-0.2.2.tar.gz:

Publisher: publish-to-pypi.yml on Tolfx/netbox-plugin-interface-view

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_interface_view-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for netbox_interface_view-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d8470d92a9bb55a7c1e8ae08f53016e0f8ba9403cd4c9e63f59de8b15641b5a4
MD5 057cb3bf1183bc24abe89d5ea20d2a64
BLAKE2b-256 f984a18101eb9de3587ed9e37280a0d1bc5bdbb2e2e06ef9d4ecb9c0e7038f8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_interface_view-0.2.2-py3-none-any.whl:

Publisher: publish-to-pypi.yml on Tolfx/netbox-plugin-interface-view

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