NetBox Custom Reports
NetBox includes customized reporting that allows the user to write Python code and determine the validity of the data within NetBox .
The REPORTS_ROOT
variable is setup as a mapped directory within this Docker container to /reports/
and includes the example directly from the documentation for devices.py
.
However, it has been renamed to devices.py.example
which prevents NetBox from recognizing it as a valid report.
To re-enable this default report, simply rename devices.py.example
to devices.py
and browse to <your-netbox-url>/extras/reports/
.
You can also add any other report to this directory and NetBox will be able to see it without restarting the container.
NetBox Custom Scripts
NetBox includes customized scripts that allows the user to write Python code to execute custom logic from within the NetBox UI. Custom reports allow you to report on data, whereas custom scripts enable the user to directly and conveniently manipulate NetBox data in a prescribed fashion. They can be used to accomplish myriad tasks, such as:
- Automatically populate new devices and cables in preparation for a new site deployment
- Create a range of new reserved prefixes or IP addresses
- Fetch data from an external source and import it to NetBox
The SCRIPTS_ROOT
variable is setup as a mapped directory within this Docker container to /scripts/
.
To add and enable this custom scripts, simply add a script to the /scripts/
and browse to <your-netbox-url>/extras/scripts/
.