add Custom Scripts info & fix url

Ryan Merolle 2022-01-30 17:59:49 -05:00
parent ef4c695812
commit b2ca704752
2 changed files with 23 additions and 8 deletions

@ -0,0 +1,23 @@
## NetBox Custom Reports
NetBox includes [customized reporting][netbox-reports-doc] 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][netbox-scripts-doc] 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/`.
[netbox-reports-doc]: https://netbox.readthedocs.io/en/stable/customization/reports/
[netbox-scripts-doc]: https://netbox.readthedocs.io/en/stable/customization/custom-scripts/

@ -1,8 +0,0 @@
NetBox includes [customized reporting][netbox-reports-doc] 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-reports-doc]: https://netbox.readthedocs.io/en/stable/additional-features/reports/