netbox-inventory icon indicating copy to clipboard operation
netbox-inventory copied to clipboard

FR: Inventory Audit Workflows

Open alehaa opened this issue 1 year ago • 2 comments

With this feature request, I propose to add the ability to audit the inventory on site, i.e. to check if things that should be there are actually there.

Managing inventory in NetBox is already an important step. However, keeping it up to date is also important in order to be able to rely on this data. Until now, reconciling the inventory in NetBox has been tedious because you have to look in different places and use different forms for changing data. Also, this process can vary between different use cases. Simple to use workflows should make this work easier.

In general I propose adding two models for managing these workflows: One for the audit workflow itself and one for the individual workflow steps.

  • An AuditWorkflow would be associated with a NetBox ObjectType from which an audit workflow can be launched. I.e. you could define a specific workflow to be started for data center locations, while another workflow is specific to offices. A button would be added to these objects (e.g. a location) to start the workflow.
  • An AuditWorkflowPage would be linked to a specific NetBox ObjectType to list and compare with what's seen in real life. Additional buttons can be added to these pages to perform quick actions.

Example Workflow

Let's say you want to check the inventory in an office.

  • You would navigate to the NetBox location of that office room.
  • On top of the location page you'll find a "start audit" button to start the workflow.
  • You'll be redirected to the first audit workflow page.
  • The first page asks whether Switches are installed in this room. For this Asset with filter device_type__manufacturer__slug='cisco' will be listed. Device objects could be listed instead if needed.
  • The next page asks for computers.
  • The next for printers.
  • And so on.

The workflows and pages can be customized by administrators. Models of this plugin can be listed on workflow pages, or any other model as long as it can be filtered in a meaningful way.

Implementation

Currently a prototype is being developed as a standalone plugin. However, I think it might be useful to integrate this directly into netbox-inventory, as these workflows are somehow related to inventory management. With this FR I'd like to check if this is accepted as PR. If so, I would provide a PR once the prototype is ready. If not, I'm willing to release a separate plugin as well.

alehaa avatar Dec 09 '24 09:12 alehaa

This sounds like a useful addition.

On workflow pages where a list of assets (or devices, etc) is displayed, would you have a checkbox or something for stuff that was audited (seen). And that would save a timestamp + user so there is an actual audit trail?

matejv avatar Dec 18 '24 11:12 matejv

Our current prototype doesn't cover audit trails, but I've been thinking about that too. I'll look into adding that feature once the first iteration works.

alehaa avatar Dec 18 '24 17:12 alehaa