Allow addition of custom fields for devices #92

Closed
opened 2025-12-29 15:32:29 +01:00 by adam · 11 comments
Owner

Originally created by @jpwgarrison on GitHub (Jun 30, 2016).

This will help those of us hoping to migrate from untenable spreadsheets. We have attributes for devices that only make sense to our engineers, but they are important.

Originally created by @jpwgarrison on GitHub (Jun 30, 2016). This will help those of us hoping to migrate from untenable spreadsheets. We have attributes for devices that only make sense to our engineers, but they are important.
adam closed this issue 2025-12-29 15:32:29 +01:00
Author
Owner

@ryanmerolle commented on GitHub (Jul 1, 2016):

How are you thinking about showing these custom fields? Would they have options on whether they were mandatory or displayed in the list/table of a section?

For example, I may be an engineer that would want to add a custom field to sites to label the site as an office or data center. I may think that would be important enough to display on the main site list or even filter by.

@ryanmerolle commented on GitHub (Jul 1, 2016): How are you thinking about showing these custom fields? Would they have options on whether they were mandatory or displayed in the list/table of a section? For example, I may be an engineer that would want to add a custom field to sites to label the site as an office or data center. I may think that would be important enough to display on the main site list or even filter by.
Author
Owner

@ryanmerolle commented on GitHub (Jul 1, 2016):

Possible Supported Data/Form types for custom fields:

  • date
  • timestamp
  • boolean
  • int
  • text (short single line vs multi line)
  • urls? (I know can be text, but maybe it makes sense?)
@ryanmerolle commented on GitHub (Jul 1, 2016): Possible Supported Data/Form types for custom fields: - date - timestamp - boolean - int - text (short single line vs multi line) - urls? (I know can be text, but maybe it makes sense?)
Author
Owner

@ryanmerolle commented on GitHub (Jul 1, 2016):

I just noticed this state for devices, it would probably make sense to be allowed for all types of data in dcim and ipam sections.

@ryanmerolle commented on GitHub (Jul 1, 2016): I just noticed this state for devices, it would probably make sense to be allowed for all types of data in dcim and ipam sections.
Author
Owner

@jpwgarrison commented on GitHub (Jul 1, 2016):

+1 for URL handling, having direct links to iDrac/iLo consoles would be awesome.

@jpwgarrison commented on GitHub (Jul 1, 2016): +1 for URL handling, having direct links to iDrac/iLo consoles would be awesome.
Author
Owner

@ghost commented on GitHub (Jul 22, 2016):

i believe the way lansweeper does it is it uses pre-existing fields in the device info table. custom1, custom2, custom3, up to whatever their max is.

then, in the device page, you can add the custom fields and add a descriptive field label for the page. we use this to list things such as: patch window, patch admin, audit owner, app owner, DBA team, ILO IP, KVM IP, etc.

i believe you can arrange these fields in lansweeper, such that they appear where you want them to on the screen. i don't know that this functionality is actually required though. maybe allow for device information in two columns, second column being custom fields, if any are populated, labeled by the assigned custom label.

i think this should be a site-wide custom field setting, though, so we don't have to track per-device customizations.

@ghost commented on GitHub (Jul 22, 2016): i believe the way lansweeper does it is it uses pre-existing fields in the device info table. custom1, custom2, custom3, up to whatever their max is. then, in the device page, you can add the custom fields and add a descriptive field label for the page. we use this to list things such as: patch window, patch admin, audit owner, app owner, DBA team, ILO IP, KVM IP, etc. i believe you can arrange these fields in lansweeper, such that they appear where you want them to on the screen. i don't know that this functionality is actually _required_ though. maybe allow for device information in two columns, second column being custom fields, if any are populated, labeled by the assigned custom label. i think this should be a site-wide custom field setting, though, so we don't have to track per-device customizations.
Author
Owner

@malaiam commented on GitHub (Jul 27, 2016):

I agree that custom attributes are needed for all types of data withing ipam and dcim at least. I feel I could use some custom fields for prefixes for instance. Could AVPs be a solution for these data types? And display them as a list of tags? Maybe with custom colours per tag so that they make sense and not become just a blob of chars? It would of course be nice if they are also searchable.

@malaiam commented on GitHub (Jul 27, 2016): I agree that custom attributes are needed for all types of data withing ipam and dcim at least. I feel I could use some custom fields for prefixes for instance. Could AVPs be a solution for these data types? And display them as a list of tags? Maybe with custom colours per tag so that they make sense and not become just a blob of chars? It would of course be nice if they are also searchable.
Author
Owner

@hdinthkld commented on GitHub (Aug 21, 2016):

RequestTracker by Best Practical supported the concept of custom fields that were not hard coded into the database schema. It was a complicated affair but I would still feel this is the better approach that giving a hard number of fields. Recently they've also added Asset Management functionality, probably based on this custom field architecture.

Perhaps an alternative is to store this additional custom metadata separate to the main database, e.g. in a document oriented database such as MongoDB. That way we get maximum flexibility without over-complicating the main schema?

Not familiar with PostgreSQL perhaps it has a better way of handling this variable data internally than other RDBMS.

@hdinthkld commented on GitHub (Aug 21, 2016): RequestTracker by Best Practical supported the concept of custom fields that were not hard coded into the database schema. It was a complicated affair but I would still feel this is the better approach that giving a hard number of fields. Recently they've also added Asset Management functionality, probably based on this custom field architecture. Perhaps an alternative is to store this additional custom metadata separate to the main database, e.g. in a document oriented database such as MongoDB. That way we get maximum flexibility without over-complicating the main schema? Not familiar with PostgreSQL perhaps it has a better way of handling this variable data internally than other RDBMS.
Author
Owner

@jeremystretch commented on GitHub (Sep 12, 2016):

Custom fields have been implemented in the develop branch and will be released in v1.6.

@jeremystretch commented on GitHub (Sep 12, 2016): Custom fields have been implemented in the `develop` branch and will be released in v1.6.
Author
Owner

@fone commented on GitHub (Sep 20, 2016):

With the custom field option- is it possible to add a custom field to the "IP Address Import Page" ?

I was hoping to add a "host name" field, and simply import a bunch of addresses including the "host name".

@fone commented on GitHub (Sep 20, 2016): With the custom field option- is it possible to add a custom field to the "IP Address Import Page" ? I was hoping to add a "host name" field, and simply import a bunch of addresses including the "host name".
Author
Owner

@jeremystretch commented on GitHub (Sep 20, 2016):

Bulk import is not currently supported for custom fields. We'd need to revamp the import logic and replace it with something other than headless CSV for that to work.

@jeremystretch commented on GitHub (Sep 20, 2016): Bulk import is not currently supported for custom fields. We'd need to revamp the import logic and replace it with something other than headless CSV for that to work.
Author
Owner

@AnythingOverIP commented on GitHub (Aug 9, 2017):

you can have a look at https://github.com/digitalocean/netbox/issues/568 for a possible approach...

@AnythingOverIP commented on GitHub (Aug 9, 2017): you can have a look at https://github.com/digitalocean/netbox/issues/568 for a possible approach...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#92