Auto-increment asset tag #5494

Closed
opened 2025-12-29 19:28:42 +01:00 by adam · 2 comments
Owner

Originally created by @PieterL75 on GitHub (Oct 8, 2021).

NetBox version

v3.0.5

Feature type

Change to existing functionality

Proposed functionality

For all our devices we provide an AssetTag.
That field is already provisioned in the datamodel.

In our previous CMDB, when we created a new asset, the AssetTag was automatically created as the_highest+1

Can we have an option, so that all devices created get an automatic generated AssetTag.
An assettag then ofcourse needs to have digits at the end (ex DEVICE0000)

Use case

All devices have an unique tag in our datacenters. This way, we can easily send our DC Engineers and the H&Y guys to the racks and find the device.
This feature will make the work easier for people creating new devices and assigning AssetTags.

Database changes

No response

External dependencies

No response

Originally created by @PieterL75 on GitHub (Oct 8, 2021). ### NetBox version v3.0.5 ### Feature type Change to existing functionality ### Proposed functionality For all our devices we provide an AssetTag. That field is already provisioned in the datamodel. In our previous CMDB, when we created a new asset, the AssetTag was automatically created as the_highest+1 Can we have an option, so that all devices created get an automatic generated AssetTag. An assettag then ofcourse needs to have digits at the end (ex DEVICE0000) ### Use case All devices have an unique tag in our datacenters. This way, we can easily send our DC Engineers and the H&Y guys to the racks and find the device. This feature will make the work easier for people creating new devices and assigning AssetTags. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 19:28:42 +01:00
adam closed this issue 2025-12-29 19:28:42 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 8, 2021):

This would probably be best implemented as a simple plugin that listens for the post_save signal and updates newly-created devices accordingly.

@jeremystretch commented on GitHub (Oct 8, 2021): This would probably be best implemented as a simple plugin that listens for the `post_save` signal and updates newly-created devices accordingly.
Author
Owner

@PieterL75 commented on GitHub (Oct 12, 2021):

I'll see if I can get that to work
https://docs.djangoproject.com/en/3.2/ref/signals/#post-save
I was not aware of these signals in Django, It will also solve the issue I have that I need webhooks to run a custom script when a prefix is updated.
With a plugin using the post-save, the update of the prefix will not need a webhook to itself anymore

thank you for the guidance

@PieterL75 commented on GitHub (Oct 12, 2021): I'll see if I can get that to work https://docs.djangoproject.com/en/3.2/ref/signals/#post-save I was not aware of these signals in Django, It will also solve the issue I have that I need webhooks to run a custom script when a prefix is updated. With a plugin using the post-save, the update of the prefix will not need a webhook to itself anymore thank you for the guidance
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5494