Skip to main content

Netbox plugin to sync data between LibreNMS and Netbox.

Project description

NetBox LibreNMS Plugin

The NetBox LibreNMS Plugin enables integration between NetBox and LibreNMS, allowing you to leverage data from both systems. NetBox remains the Source of Truth (SoT) for you network, but this plugin allows you to easily onboard device objects from existing data in LibreNMS. The plugin does not automatically create objects in NetBox to ensure only verified data is used to populate NetBox.

This is in early development.

Features

The plugin offers the following key features:

Interface Sync

Pull interface data from Devices and Virtual Machines from LibreNMS into NetBox. The following interface attributes are synchronized:

  • Name
  • Description
  • Status (Enabled/Disabled)
  • Type (with custom mapping support)
  • Speed
  • MTU
  • MAC Address

Set custom mappings for interface types to ensure that the correct interface type is used when syncing from LibreNMS to NetBox.

Cable Sync

Create cable connection in NetBox from LibreNMS links data.

Add device to LibreNMS from Netbox

  • Add device to LibreNMS from Netbox device page. Only SNMP v2c available.

Site & Location Synchronization

The plugin also supports synchronizing NetBox Sites with LibreNMS locations:

  • Compare NetBox sites to LibreNMS location data
  • Create LibreNMS locations to match NetBox sites
  • Update existing LibreNMS locations langitude and longitude values based on NetBox data
  • Sync device site to LibreNMS location

Screenshots/GIFs

Site & Location Sync

Site Location Sync

Sync devices and Interfaces

Add device and interfaces

Virtual Chassis Member Select

Virtual Chassis Member Selection

Interface Type Mappings

Interfaces Type Mappings

Contributing

There's more to do! Coding is not my day job. Bugs will exist and imporvements will be needed. So contributions are very welcome! I've got more ideas for new features and imporvements but please contribute if you can!

Or just share your ideas for the plugin over in discussions.

Compatibility

NetBox Version Plugin Version
4.1 0.2.x

Installing

Netbox 4.1+ is required.

Standard Installation

Activate your virtual environment and install the plugin:

source /opt/netbox/venv/bin/activate

Install with pip:

(venv) $ pip install netbox-librenms-plugin

Add to your local_requirements.txt to ensure it is automatically reinstalled during future upgrades.

 "netbox-librenms-plugin" >> /opt/netbox/local_requirements.txt

Docker

For adding to a NetBox Docker setup see how to create a custom Docker image. the general instructions for using netbox-docker with plugins.

Add the plugin to plugin_requirements.txt (netbox-docker):

# plugin_requirements.txt
netbox-librenms-plugin

Configuration

Enable the plugin in /opt/netbox/netbox/netbox/configuration.py, or if you use netbox-docker, your /configuration/plugins.py file :

PLUGINS = [
    'netbox_librenms_plugin'
]

PLUGINS_CONFIG = {
    'netbox_librenms_plugin': {
        'librenms_url': 'https://your-librenms-instance.com',
        'api_token': 'your_librenms_api_token',
        'cache_timeout': 300,
        'verify_ssl': True, # Change to False if needed,
    }
}

Apply Database Migrations

Apply database migrations with Netbox manage.py:

(venv) $ python manage.py migrate

Collect Static Files

The plugin includes static files that need to be collected by NetBox. Run the following command to collect static files:

(venv) $ python manage.py collectstatic --no-input

Restart Netbox

Restart the Netbox service to apply changes:

sudo systemctl restart netbox

Uninstall

See the instructions for uninstalling plugins.

Credits

Based on the NetBox plugin tutorial and docs:

This package was created with Cookiecutter. Thanks to the netbox-community/cookiecutter-netbox-plugin for the project template.

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_librenms_plugin-0.2.8.tar.gz (8.8 MB view details)

Uploaded Source

Built Distribution

netbox_librenms_plugin-0.2.8-py3-none-any.whl (47.4 kB view details)

Uploaded Python 3

File details

Details for the file netbox_librenms_plugin-0.2.8.tar.gz.

File metadata

File hashes

Hashes for netbox_librenms_plugin-0.2.8.tar.gz
Algorithm Hash digest
SHA256 36e2335d346dd7560ac83d2dccae375c036f00ded0b28355ecd3794e01902d2d
MD5 bc622418bd3750c5cbbfa42929686067
BLAKE2b-256 17ab67200f33eb643af79aee827e6f13af8b8f4ef224e56eca63a6e4b251be58

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_librenms_plugin-0.2.8.tar.gz:

Publisher: publish-pypi.yaml on bonzo81/netbox-librenms-plugin

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_librenms_plugin-0.2.8-py3-none-any.whl.

File metadata

File hashes

Hashes for netbox_librenms_plugin-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 38a24cd2a58bb4905b220dd5f0be8df147b536c5e20f1d815ddd106e3470bf10
MD5 bea26326bf52208a2d6a5525c4c25d78
BLAKE2b-256 b3d5d2cb544cf6b5479db3c65e218ddeee4f54d38299c2c86faaad3186aac3dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_librenms_plugin-0.2.8-py3-none-any.whl:

Publisher: publish-pypi.yaml on bonzo81/netbox-librenms-plugin

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 Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page