Name | netbox-librenms-plugin JSON |
Version |
0.3.6
JSON |
| download |
home_page | None |
Summary | Netbox plugin to sync data between LibreNMS and Netbox. |
upload_time | 2025-01-21 11:12:25 |
maintainer | None |
docs_url | None |
author | Andy Norwood |
requires_python | >=3.10.0 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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](docs/usage_tips/interface_mappings.md))
- 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.
### IP Address Sync
Create IP address in NetBox from LibreNMS device IP data.
### Add device to LibreNMS from Netbox
- Add device to LibreNMS from Netbox device page. SNMP v2c and v3 are supported.
### 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
>Screenshots from older plugin version
#### 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. Contributions are very welcome! I've got more ideas for new features and imporvements but please [contribute](docs/contributing.md) if you can!
Or just share your ideas for the plugin over in [discussions](https://github.com/bonzo81/netbox-librenms-plugin/discussions ).
## Compatibility
| NetBox Version | Plugin Version |
|----------------|----------------|
| 4.1 | 0.2.x - 0.3.5 |
| 4.2 | 0.3.6 |
## Installing
### Standard Installation
Activate your virtual environment and install the plugin:
```bash
source /opt/netbox/venv/bin/activate
```
Install with pip:
```bash
(venv) $ pip install netbox-librenms-plugin
```
Add to your `local_requirements.txt` to ensure it is automatically reinstalled during future upgrades.
```bash
"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](https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins).
Add the plugin to `plugin_requirements.txt` (netbox-docker):
```bash
# plugin_requirements.txt
netbox-librenms-plugin
```
## Configuration
### 1. Enable the Plugin
Enable the plugin in `/opt/netbox/netbox/netbox/configuration.py`,
or if you use netbox-docker, your `/configuration/plugins.py` file :
```python
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, # Optional: Change to False if needed,
'interface_name_field': 'ifDescr', # Optional: LibreNMS field used for interface name. ifName used as default
}
}
```
### 2. Apply Database Migrations
Apply database migrations with Netbox `manage.py`:
```
(venv) $ python manage.py migrate
```
### 3. 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
```
### 4. Restart Netbox
Restart the Netbox service to apply changes:
```
sudo systemctl restart netbox
```
### 5. Custom Field
It is recommended (but not essential) to add a custom field `librenms_id` to the Device, Virtual Machine and Interface models in NetBox. Use the following settings:
- **Object Types:**
- Check **dcim > device**
- Check **virtualization > virtual machine**
- Check **dcim > interface**
- Check **virtualization > interfaces (optional)**
- **Name:** `librenms_id`
- **Label:** `LibreNMS ID`
- **Description:** (Optional) Add a description like "LibreNMS ID for LibreNMS Plugin".
- **Type:** Integer
- **Required:** Leave unchecked.
- **Default Value:** Leave blank.
For more info check out [custom field docs](docs/usage_tips/custom_field.md)
## Update
```
source /opt/netbox/venv/bin/activate
pip install -U netbox-librenms-plugin
python manage.py migrate
python manage.py collectstatic --no-input
systemctl restart netbox
```
## Uninstall
See [the instructions for uninstalling plugins](https://netboxlabs.com/docs/netbox/en/stable/plugins/removal/).
## Credits
Based on the NetBox plugin tutorial and docs:
- [demo repository](https://github.com/netbox-community/netbox-plugin-demo)
- [tutorial](https://github.com/netbox-community/netbox-plugin-tutorial)
- [docs](https://netboxlabs.com/docs/netbox/en/stable/plugins/development/)
This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter). Thanks to the [`netbox-community/cookiecutter-netbox-plugin`](https://github.com/netbox-community/cookiecutter-netbox-plugin) for the project template.
Raw data
{
"_id": null,
"home_page": null,
"name": "netbox-librenms-plugin",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10.0",
"maintainer_email": null,
"keywords": null,
"author": "Andy Norwood",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/db/38/64a58d25fafc56f690f6c780888a721f16bf51d114593a0d0452a20b7a8a/netbox_librenms_plugin-0.3.6.tar.gz",
"platform": null,
"description": "# NetBox LibreNMS Plugin\n\nThe 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 \nthis 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. \n\nThis is in early development.\n\n## Features\n\nThe plugin offers the following key features:\n\n### Interface Sync\nPull interface data from Devices and Virtual Machines from LibreNMS into NetBox. The following interface attributes are synchronized:\n\n- Name\n- Description\n- Status (Enabled/Disabled)\n- Type (with [custom mapping support](docs/usage_tips/interface_mappings.md))\n- Speed \n- MTU \n- MAC Address\n\n> Set custom mappings for interface types to ensure that the correct interface type is used when syncing from LibreNMS to NetBox.\n\n### Cable Sync\nCreate cable connection in NetBox from LibreNMS links data.\n\n### IP Address Sync\nCreate IP address in NetBox from LibreNMS device IP data.\n\n### Add device to LibreNMS from Netbox\n\n- Add device to LibreNMS from Netbox device page. SNMP v2c and v3 are supported.\n\n### Site & Location Synchronization\nThe plugin also supports synchronizing NetBox Sites with LibreNMS locations:\n- Compare NetBox sites to LibreNMS location data\n- Create LibreNMS locations to match NetBox sites\n- Update existing LibreNMS locations langitude and longitude values based on NetBox data\n- Sync device site to LibreNMS location\n\n\n## Screenshots/GIFs\n>Screenshots from older plugin version\n#### Site & Location Sync\n\n\n#### Sync devices and Interfaces\n\n\n#### Virtual Chassis Member Select\n\n\n#### Interface Type Mappings\n\n\n\n\n## Contributing\nThere's more to do! Coding is not my day job. Bugs will exist and imporvements will be needed. Contributions are very welcome! I've got more ideas for new features and imporvements but please [contribute](docs/contributing.md) if you can!\n\nOr just share your ideas for the plugin over in [discussions](https://github.com/bonzo81/netbox-librenms-plugin/discussions ).\n\n## Compatibility\n\n| NetBox Version | Plugin Version |\n|----------------|----------------|\n| 4.1 | 0.2.x - 0.3.5 |\n| 4.2 | 0.3.6 |\n## Installing\n\n\n### Standard Installation\n\nActivate your virtual environment and install the plugin:\n\n```bash\nsource /opt/netbox/venv/bin/activate\n```\nInstall with pip:\n\n```bash\n(venv) $ pip install netbox-librenms-plugin\n```\n\nAdd to your `local_requirements.txt` to ensure it is automatically reinstalled during future upgrades.\n\n```bash\n \"netbox-librenms-plugin\" >> /opt/netbox/local_requirements.txt\n```\n\n### Docker\n\nFor adding to a NetBox Docker setup see how to create a custom Docker image.\n[the general instructions for using netbox-docker with plugins](https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins).\n\nAdd the plugin to `plugin_requirements.txt` (netbox-docker):\n\n```bash\n# plugin_requirements.txt\nnetbox-librenms-plugin\n```\n\n## Configuration\n\n### 1. Enable the Plugin\nEnable the plugin in `/opt/netbox/netbox/netbox/configuration.py`,\n or if you use netbox-docker, your `/configuration/plugins.py` file :\n\n```python\nPLUGINS = [\n 'netbox_librenms_plugin'\n]\n\nPLUGINS_CONFIG = {\n 'netbox_librenms_plugin': {\n 'librenms_url': 'https://your-librenms-instance.com',\n 'api_token': 'your_librenms_api_token',\n 'cache_timeout': 300,\n 'verify_ssl': True, # Optional: Change to False if needed,\n 'interface_name_field': 'ifDescr', # Optional: LibreNMS field used for interface name. ifName used as default\n }\n}\n```\n\n### 2. Apply Database Migrations\n\nApply database migrations with Netbox `manage.py`:\n\n```\n(venv) $ python manage.py migrate\n```\n\n### 3. Collect Static Files\n\nThe plugin includes static files that need to be collected by NetBox. Run the following command to collect static files:\n\n```\n(venv) $ python manage.py collectstatic --no-input\n```\n\n### 4. Restart Netbox\n\nRestart the Netbox service to apply changes:\n\n```\nsudo systemctl restart netbox\n```\n\n### 5. Custom Field\nIt is recommended (but not essential) to add a custom field `librenms_id` to the Device, Virtual Machine and Interface models in NetBox. Use the following settings:\n\n- **Object Types:** \n - Check **dcim > device**\n - Check **virtualization > virtual machine**\n - Check **dcim > interface**\n - Check **virtualization > interfaces (optional)**\n- **Name:** `librenms_id`\n- **Label:** `LibreNMS ID`\n- **Description:** (Optional) Add a description like \"LibreNMS ID for LibreNMS Plugin\".\n- **Type:** Integer\n- **Required:** Leave unchecked.\n- **Default Value:** Leave blank.\n\nFor more info check out [custom field docs](docs/usage_tips/custom_field.md)\n\n## Update\n\n```\nsource /opt/netbox/venv/bin/activate\npip install -U netbox-librenms-plugin\npython manage.py migrate\npython manage.py collectstatic --no-input\nsystemctl restart netbox\n```\n\n## Uninstall\n\nSee [the instructions for uninstalling plugins](https://netboxlabs.com/docs/netbox/en/stable/plugins/removal/).\n\n## Credits\n\nBased on the NetBox plugin tutorial and docs:\n\n- [demo repository](https://github.com/netbox-community/netbox-plugin-demo)\n- [tutorial](https://github.com/netbox-community/netbox-plugin-tutorial)\n- [docs](https://netboxlabs.com/docs/netbox/en/stable/plugins/development/)\n\nThis package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter). Thanks to the [`netbox-community/cookiecutter-netbox-plugin`](https://github.com/netbox-community/cookiecutter-netbox-plugin) for the project template. \n",
"bugtrack_url": null,
"license": null,
"summary": "Netbox plugin to sync data between LibreNMS and Netbox.",
"version": "0.3.6",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a10af1bd83f29767f7d27195db39874fcdbe0ff22a7f632b4ac96e569d404710",
"md5": "87d9956acb699d3a702205e4c6ad33bb",
"sha256": "25f9ebad2d8189692a11039817ea414b8578a5add23e0316704b4479654ba5e4"
},
"downloads": -1,
"filename": "netbox_librenms_plugin-0.3.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "87d9956acb699d3a702205e4c6ad33bb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10.0",
"size": 74231,
"upload_time": "2025-01-21T11:12:23",
"upload_time_iso_8601": "2025-01-21T11:12:23.375048Z",
"url": "https://files.pythonhosted.org/packages/a1/0a/f1bd83f29767f7d27195db39874fcdbe0ff22a7f632b4ac96e569d404710/netbox_librenms_plugin-0.3.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "db3864a58d25fafc56f690f6c780888a721f16bf51d114593a0d0452a20b7a8a",
"md5": "03e2a572aa3d016c67e38e4c08bca004",
"sha256": "b785e2c2d49ccaaa5f500d45970a355e1a33d21a5232a4a849ebbd80a26aa696"
},
"downloads": -1,
"filename": "netbox_librenms_plugin-0.3.6.tar.gz",
"has_sig": false,
"md5_digest": "03e2a572aa3d016c67e38e4c08bca004",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10.0",
"size": 8847668,
"upload_time": "2025-01-21T11:12:25",
"upload_time_iso_8601": "2025-01-21T11:12:25.251578Z",
"url": "https://files.pythonhosted.org/packages/db/38/64a58d25fafc56f690f6c780888a721f16bf51d114593a0d0452a20b7a8a/netbox_librenms_plugin-0.3.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-21 11:12:25",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "netbox-librenms-plugin"
}