object location history - track where objects have been #8406

Closed
opened 2025-12-29 20:36:18 +01:00 by adam · 4 comments
Owner

Originally created by @ITJamie on GitHub (Aug 3, 2023).

NetBox version

v3.5.7

Feature type

Change to existing functionality

Proposed functionality

When a device is added/removed or its position moved in a rack it would be awesome if there was a changelog visible on the rack object (this could be in a separate panel rather than in the existing changelog).

On device save it would check to see if the position/rack changes. if so insert the change into the new model (see below)

Use case

when viewing a rack it would be great to see the "related" changes to the rack.

Database changes

I believe trying to filter the existing changelog for this information would be computationally expensive, so a new model would probably be recommended

model to hold a list of device position changes:

  • datetimestamp?
  • device id
  • rack_id_before_change
  • rack_id_after_change
  • position_before_change
  • position_after_change
  • device_changelog_id (useful to be able to link to the full device changelog where, until that changelog is purged...)

External dependencies

No response

Originally created by @ITJamie on GitHub (Aug 3, 2023). ### NetBox version v3.5.7 ### Feature type Change to existing functionality ### Proposed functionality When a device is added/removed or its position moved in a rack it would be awesome if there was a changelog visible on the rack object (this could be in a separate panel rather than in the existing changelog). On device save it would check to see if the position/rack changes. if so insert the change into the new model (see below) ### Use case when viewing a rack it would be great to see the "related" changes to the rack. ### Database changes I believe trying to filter the existing changelog for this information would be computationally expensive, so a new model would probably be recommended model to hold a list of device position changes: - datetimestamp? - device id - rack_id_before_change - rack_id_after_change - position_before_change - position_after_change - device_changelog_id (useful to be able to link to the full device changelog where, until that changelog is purged...) ### External dependencies _No response_
adam added the type: featureplugin candidatepending closure labels 2025-12-29 20:36:19 +01:00
adam closed this issue 2025-12-29 20:36:19 +01:00
Author
Owner

@abhi1693 commented on GitHub (Aug 3, 2023):

This feels like an anti-pattern for Changelog to me. Although, the request sounds good but having a separate changelog for such a specific purpose does not feel right. This can be achieved using a plugin that intercepts the post_save signals and then processes the information into the DB as you have mentioned. You can then attach a tab to the view and get a similar implementation.

@abhi1693 commented on GitHub (Aug 3, 2023): This feels like an anti-pattern for Changelog to me. Although, the request sounds good but having a separate changelog for such a specific purpose does not feel right. This can be achieved using a plugin that intercepts the post_save signals and then processes the information into the DB as you have mentioned. You can then attach a tab to the view and get a similar implementation.
Author
Owner

@ITJamie commented on GitHub (Aug 3, 2023):

im perfectly fine with trying to reuse the existing changelog, however I'm not sure if it would scale well across a large changelog (ours is indefinite and has 1million+ entrys)

there are probably a few models where this could make sense.

  • tracking device history in racks
  • tracking module history in devices
  • tracking device location history across sites /locations (think aps that might get moved)
  • virtual machine location history across clusters

Ill happily go make a plugin but I wanted to propose it here as core functionality to see if others were interested before going that route

@ITJamie commented on GitHub (Aug 3, 2023): im perfectly fine with trying to reuse the existing changelog, however I'm not sure if it would scale well across a large changelog (ours is indefinite and has 1million+ entrys) there are probably a few models where this could make sense. - tracking device history in racks - tracking module history in devices - tracking device location history across sites /locations (think aps that might get moved) - virtual machine location history across clusters Ill happily go make a plugin but I wanted to propose it here as core functionality to see if others were interested before going that route
Author
Owner

@bitcollector1 commented on GitHub (Aug 3, 2023):

I kind of like this idea. I'm using SUZIEQ to track where a mac address has been but this could be a nice feature to have in NetBox itself.

@bitcollector1 commented on GitHub (Aug 3, 2023): I kind of like this idea. I'm using SUZIEQ to track where a mac address has been but this could be a nice feature to have in NetBox itself.
Author
Owner

@jsenecal commented on GitHub (Aug 3, 2023):

Marking this as a plugin candidate - Thanks for your suggestion @ITJamie

@jsenecal commented on GitHub (Aug 3, 2023): Marking this as a plugin candidate - Thanks for your suggestion @ITJamie
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8406