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
Sync devices and Interfaces
Virtual Chassis Member Select
Interface 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.
Release files for netbox-librenms-plugin 0.2.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| netbox_librenms_plugin-0.2.9.tar.gz | 8.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| netbox_librenms_plugin-0.2.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 MB
Release files / netbox_librenms_plugin-0.2.9.tar.gz
| Download URL | netbox_librenms_plugin-0.2.9.tar.gz |
|---|---|
| Size | 8.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6dc94d354335ee487f04cd5a7809012e4d819779703b2b8c33a0a46282fe58c
|
|
BLAKE2b-256 checksum How to use checksums |
09715efd660d7f8b89b33ec5ad9850bce8b464169b8d94c7a41c23df7609032b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2024.
Transparency logRelease files / netbox_librenms_plugin-0.2.9-py3-none-any.whl
| Download URL | netbox_librenms_plugin-0.2.9-py3-none-any.whl |
|---|---|
| Size | 50.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1865e665c7307a2e252c06fed84dac60c3e257ec16aed2fcebf145e9f396935
|
|
BLAKE2b-256 checksum How to use checksums |
a1429dcea905ee9da6d8c935874eb24d446bdaf964d0ec591557227c2262c408
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2024.
Transparency log