Follow the attribution requirements of the Apache License 2.0 for this fork of ICTU/netbox_slm: - add a NOTICE file with the original copyright (ICTU) and the fork's notice - mark every file changed since upstream 1.9.0 as modified (section 4b); the original copyright header in __init__.py is kept - add a visible fork notice and a section on origin, credits, changes and license to the README - point project URLs to this fork (with an Upstream link), list ICTU as author and MrBlake as maintainer, and stop showing ICTU's email address as the plugin contact - ship NOTICE in the package and drop the MANIFEST entry for the removed SECURITY.md Bump version to 1.14.1. Co-Authored-By: Claude Opus 5.5 <[email protected]>
237 lines
9.0 KiB
Markdown
237 lines
9.0 KiB
Markdown
# NetBox SLM
|
||
|
||
Software lifecycle and license management for NetBox: software products,
|
||
versions, installations, licenses and certificates — with expiry notifications
|
||
and optional tenant assignment.
|
||
|
||
> **Fork notice:** This is a modified version of [NetBox SLM](https://github.com/ICTU/netbox_slm)
|
||
> by **ICTU**, licensed under the [Apache License 2.0](LICENSE). It is maintained independently
|
||
> and is not affiliated with or endorsed by ICTU. See [Origin, license and credits](#origin-license-and-credits).
|
||
|
||
| | |
|
||
|---|---|
|
||
| **Plugin name** | `netbox_slm` |
|
||
| **Package** | `netbox-slm` |
|
||
| **NetBox** | `4.6.5` – `4.7.x` |
|
||
| **Python** | `>=3.11` |
|
||
| **Repository** | <https://git.mrblake.cc/MrBlake/NetBox-SLM> |
|
||
|
||
## Screenshots
|
||
|
||
Software licenses with expiry dates:
|
||
|
||

|
||
|
||
Certificates:
|
||
|
||

|
||
|
||
Software installations on devices and virtual machines:
|
||
|
||

|
||
|
||
## Features
|
||
|
||
- Manage software products and manufacturers
|
||
- Track versions, release types and support periods
|
||
- Assign installations to devices, virtual machines or clusters
|
||
- Manage software licenses including term, scope and storage location
|
||
- Lifetime licenses or renewal intervals in days, months or years
|
||
- Store license files, license keys and links to the vendor portal
|
||
- Expiry warnings one month and one week before license end by default
|
||
- Additional custom warning period in days, weeks or months
|
||
- NetBox notifications and optional e-mail via NetBox's SMTP configuration
|
||
- Assign licenses to tenant groups and tenants
|
||
- Manage certificates with common name, SANs, issuer, serial number, fingerprint and validity period
|
||
- Assign certificates to software products, installations, devices, virtual machines and tenants
|
||
- Store certificate files and storage locations (private keys are intentionally not stored)
|
||
- Full NetBox UI and REST API
|
||
- Filters, bulk import and bulk edit
|
||
- UI available in English and German (follows the user's NetBox language)
|
||
|
||
> **Note:** License keys are stored in the NetBox database and license files in
|
||
> NetBox's media directory. Protect and back up the database, REST API and media
|
||
> directory accordingly.
|
||
|
||
## Compatibility
|
||
|
||
- NetBox `4.6.5` – `4.7.x` (verified with 4.7.2)
|
||
- Python `>=3.11`
|
||
|
||
## Installation
|
||
|
||
All paths assume a standard installation under `/opt/netbox`.
|
||
|
||
### 1. Install the package
|
||
|
||
```bash
|
||
/opt/netbox/venv/bin/pip install --upgrade --force-reinstall \
|
||
"git+https://git.mrblake.cc/MrBlake/NetBox-SLM.git@master"
|
||
```
|
||
|
||
For reproducible production installs, replace `master` with a release tag or a
|
||
full commit ID.
|
||
|
||
### 2. Add the plugin to `local_requirements.txt`
|
||
|
||
This makes `upgrade.sh` reinstall the plugin automatically on every NetBox upgrade:
|
||
|
||
```bash
|
||
grep -qxF "git+https://git.mrblake.cc/MrBlake/NetBox-SLM.git@master" /opt/netbox/local_requirements.txt \
|
||
|| echo "git+https://git.mrblake.cc/MrBlake/NetBox-SLM.git@master" | sudo tee -a /opt/netbox/local_requirements.txt
|
||
```
|
||
|
||
If the repository is private, the NetBox server needs a read-only deploy token
|
||
or an SSH key. Do not store credentials in `local_requirements.txt`.
|
||
|
||
### 3. Enable the plugin
|
||
|
||
In `/opt/netbox/netbox/netbox/configuration.py`:
|
||
|
||
```python
|
||
PLUGINS = [
|
||
"netbox_slm",
|
||
]
|
||
```
|
||
|
||
If other plugins are already configured, add `netbox_slm` to the existing list.
|
||
No `PLUGINS_CONFIG` is required for standard operation.
|
||
|
||
### 4. Apply migrations, collect static files, restart
|
||
|
||
```bash
|
||
cd /opt/netbox/netbox
|
||
/opt/netbox/venv/bin/python manage.py migrate netbox_slm
|
||
/opt/netbox/venv/bin/python manage.py collectstatic --no-input
|
||
sudo systemctl restart netbox netbox-rq
|
||
```
|
||
|
||
Check the installed version:
|
||
|
||
```bash
|
||
/opt/netbox/venv/bin/pip show netbox-slm
|
||
```
|
||
|
||
## Update
|
||
|
||
```bash
|
||
/opt/netbox/venv/bin/pip install --upgrade --force-reinstall \
|
||
"git+https://git.mrblake.cc/MrBlake/NetBox-SLM.git@master"
|
||
|
||
cd /opt/netbox/netbox
|
||
/opt/netbox/venv/bin/python manage.py migrate netbox_slm
|
||
/opt/netbox/venv/bin/python manage.py collectstatic --no-input
|
||
sudo systemctl restart netbox netbox-rq
|
||
```
|
||
|
||
`--force-reinstall` makes pip pick up branch changes even if the package
|
||
version has not been bumped.
|
||
|
||
When NetBox itself is upgraded, `upgrade.sh` reinstalls the plugin from
|
||
`local_requirements.txt` and runs migrations and `collectstatic`:
|
||
|
||
```bash
|
||
sudo /opt/netbox/upgrade.sh
|
||
sudo systemctl restart netbox netbox-rq
|
||
```
|
||
|
||
## Uninstall
|
||
|
||
1. Remove `"netbox_slm"` from `PLUGINS`.
|
||
2. Remove the line from `/opt/netbox/local_requirements.txt`.
|
||
3. Uninstall the package and restart NetBox:
|
||
|
||
```bash
|
||
/opt/netbox/venv/bin/pip uninstall netbox-slm
|
||
sudo systemctl restart netbox netbox-rq
|
||
```
|
||
|
||
The plugin's database tables are not dropped automatically.
|
||
|
||
## Usage
|
||
|
||
### Expiry notifications
|
||
|
||
Notifications are enabled by default for licenses and certificates with an
|
||
expiry date. Both use the same settings, so this section applies to
|
||
certificates as well. The
|
||
default reminders are one month and one week before expiry. Per license, an
|
||
additional custom warning period can be set or the defaults can be disabled.
|
||
|
||
Recipients decide themselves whether they are notified: sales, the responsible
|
||
technician or other users open the license and click the NetBox **Subscribe**
|
||
action (**Unsubscribe** stops it). Without subscribers no message is sent.
|
||
|
||
A NetBox notification is always created. If **E-mail notifications** is enabled
|
||
on the license, the plugin also sends an e-mail to the address stored in the
|
||
user account; NetBox SMTP must be configured for this.
|
||
|
||
Enabling e-mail delivery can only be changed by administrators or users with
|
||
the permission `netbox_slm.manage_license_emails`
|
||
(licenses) or `netbox_slm.manage_certificate_emails`
|
||
(certificates). SMTP
|
||
credentials are maintained only in the NetBox server configuration and are not
|
||
visible in the plugin.
|
||
|
||
The check runs once a day as a NetBox system job (one job each for licenses
|
||
and certificates). Once the first configured
|
||
reminder date is reached, subscribers are notified on every job run up to and
|
||
including the expiry date. The NetBox RQ worker must run with scheduler support,
|
||
which is the default for a standard NetBox installation with `rqworker`.
|
||
|
||
### Certificates
|
||
|
||
Certificates are managed under **Licences → Certificates**. Each certificate
|
||
stores:
|
||
|
||
- Name, description and type (TLS server, TLS client, certificate authority,
|
||
code signing, S/MIME email, other)
|
||
- Common name, subject alternative names (one DNS name or IP address per line),
|
||
issuer, serial number and SHA-256 fingerprint
|
||
- Validity period (valid from / valid until) and an automatic renewal flag
|
||
- Certificate file, storage location (with optional URL) and provider portal URL
|
||
- Optional assignment to a software product, installation, device, virtual
|
||
machine, tenant group and tenant
|
||
|
||
When a certificate file (PEM or DER) is uploaded, the common name, subject
|
||
alternative names, issuer, serial number, SHA-256 fingerprint and validity
|
||
period are read from the file and overwrite the corresponding fields. Name and
|
||
type are only filled in if they were left empty (the type is derived from the
|
||
CA flag and extended key usage). For PEM bundles the first certificate is used.
|
||
Files that contain a private key are rejected.
|
||
|
||
> **Note:** Private keys are intentionally not stored. Keep them in a dedicated
|
||
> secret store and reference that location through the storage location fields.
|
||
|
||
Certificates are available in the REST API at `/api/plugins/slm/certificates/`
|
||
and can be filtered by e.g. `type`, `common_name`, `issuer`, `device_id`,
|
||
`virtualmachine_id`, `tenant_id`, `expiration_date__lte` and
|
||
`expiration_date__gte`.
|
||
|
||
## Origin, license and credits
|
||
|
||
**Original project:** [NetBox SLM](https://github.com/ICTU/netbox_slm) by **ICTU**
|
||
(Copyright 2022-2025 ICTU). The original plugin was started by Hedde van der Heide
|
||
and developed by ICTU and its contributors; [Mart Visser](https://github.com/MartVisser)
|
||
is named as the contact of the original project. This fork is based on release 1.9.0,
|
||
and the complete original commit history is retained in this repository.
|
||
|
||
**This fork:** maintained by MrBlake at
|
||
[git.mrblake.cc/MrBlake/NetBox-SLM](https://git.mrblake.cc/MrBlake/NetBox-SLM).
|
||
It is not affiliated with or endorsed by ICTU. Please report problems with this fork
|
||
[here](https://git.mrblake.cc/MrBlake/NetBox-SLM/issues), not to the original project.
|
||
|
||
**Main changes compared to the original** (details in [CHANGELOG.md](CHANGELOG.md)):
|
||
|
||
- Certificate management with expiry reminders and import from PEM/DER files
|
||
- Tenant group and tenant assignment for licenses
|
||
- Renewal intervals, license files, license keys and vendor portal links
|
||
- License expiry notifications in NetBox and optionally by email
|
||
- German translation
|
||
- Support for NetBox 4.6 and 4.7, installation via Git/pip instead of Docker
|
||
|
||
**License:** The original work and all modifications are licensed under the
|
||
[Apache License, Version 2.0](LICENSE). The [NOTICE](NOTICE) file lists the copyright
|
||
holders. The original copyright and license notices are retained, and every file
|
||
changed in this fork carries a notice stating that it was modified.
|