Skip to main content

Netbox plugin to sync data between LibreNMS and Netbox.

Project description

NetBox LibreNMS Plugin

This plugin provides the ability to sync selected data between Netbox and LibreNMS.

The plugin allows Netbox to remain the source of truth by allowing intentional syncing of data between NetBox and LibreNMS. The intention is to make it easier to maintain accurate data between the two systems.

This is in early development.

Features

The plugin offers the following key features:

Interface Synchronization

Pull interface data 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.

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

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.0 0.2.x

Installing

Netbox 4.0+ 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/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,
    }
}

Apply Database Migrations

Apply database migrations with Netbox manage.py:

(venv) $ python manage.py migrate

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.5.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

netbox_librenms_plugin-0.2.5-py3-none-any.whl (34.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for netbox_librenms_plugin-0.2.5.tar.gz
Algorithm Hash digest
SHA256 e09f1cded933ca1be68b89365c227089949dcd71ccc0900a7946f9a7c5ae97bb
MD5 fae27b1bb91dc227c4a445b63b72aa2f
BLAKE2b-256 4ef1f62b66a8c6674e2bfe0b3fbb1f050ff42537f37401740ca4d1c51c72ca45

See more details on using hashes here.

File details

Details for the file netbox_librenms_plugin-0.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for netbox_librenms_plugin-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ff8bc9cf482bbcf3d84b15878c3f0e46b39c0f85d1e8742a96a4225f0de1cbe8
MD5 a219cc34b062a3cb3a1555066fd59310
BLAKE2b-256 8609555fd26edb7c4db8f8800bd472cf423068ff99f96fb39f00ee03c4cb97fb

See more details on using hashes here.

Supported by

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