NetBox Custom Fields as a Lightweight Schema Extension for DCIM and IPAM
Use NetBox custom fields to add operational metadata like change tickets and compliance tags to Device, Prefix and VLAN without plugins, with API exposure and clear trade-offs.
04 Jul 2026, 00:50 UTC

Operations teams hit the same wall with NetBox: the core DCIM and IPAM models cover topology well, but they don’t capture the operational metadata you need for change control, compliance, and day-to-day runbooks. Adding a plugin or a custom model is heavy. Custom fields give you a built-in way to extend Device, Prefix, VLAN, Circuit and other models without code, with values stored in NetBox and exposed through the REST and GraphQL APIs.
The problem: operational metadata that lives outside the data model
You want to track a change ticket, a maintenance window, or a compliance tag on a device or prefix. Those attributes are not part of NetBox’s native schema. The practical choice is between leaving the data in spreadsheets, building a plugin, or using custom fields for low-code extension.
Custom fields are per-model attributes configured in the admin UI. They render on forms and detail pages, can be added to list filters and bulk edit, and are persisted as part of the object. For automation, they appear under a custom_fields object in REST and as customFields in GraphQL, so external tools can read and write them consistently with core attributes.
When custom fields fit and where they don’t
Custom fields work well for flat, descriptive metadata that is owned by a single object: text, integer, boolean, select with fixed choices, multi-select, date, URL, or JSON. You can mark a field required, unique, or filterable, which helps standardize data entry across teams.
They are not relational. A custom field cannot reference another NetBox object with a foreign key constraint. Referential integrity for things like a ticket ID must be enforced by convention or by external validation. Validation is also limited to type and choice constraints; complex cross-field business logic needs automation or a plugin.
Heavy use on high-cardinality models increases API payload size and UI rendering cost. Reporting is less ergonomic than native models because custom fields live outside the relational schema.
Worked example: change control metadata on Device
Goal: require a change ticket reference and an optional compliance tag on devices, and make both consumable by automation.
Configuration in the NetBox admin UI, as an administrator:
- Administration > Custom Fields > Add
- Name: change_ticket, Label: Change Ticket, Type: text
- Object types: dcim.device
- Required: true, Filterable: true
- Save
Add a second field for compliance:
- Name: compliance_tag, Label: Compliance Tag, Type: select
- Object types: dcim.device
- Choices: pci, hipaa, soc2, none
- Filterable: true
After creation, create or edit a Device. The fields appear in the form and on the detail page. In bulk edit, you can set values for many devices at once.
Verification steps without assuming a specific version:
- Open an existing Device detail page and confirm the new fields render.
- Use the REST API with an account that has read permission for dcim.device. Request a device by ID and check the response for a custom_fields key containing the field names you created.
- In GraphQL playground, query a sample device with customFields to confirm exposure to automation.
- Review the release notes for your installed NetBox version to confirm supported field types and UI location, as behavior has changed across releases.
Automation pattern: a webhook or scheduled job can read custom_fields.change_ticket on Device and enforce a policy, such as blocking a config push when the ticket is missing or stale. Because the values are part of the API representation, they can be written back by the same automation that updates NetBox.
Trade-offs and practical limits
Custom fields are schema extension without code, but they are not a replacement for a proper model when you need relations, complex validation, or reporting joins. Use them for operational metadata that is descriptive and relatively stable. Avoid creating dozens of fields on high-cardinality models like Prefix or IP address.
Version sensitivity matters. The admin path and available types are version sensitive. Before rolling out to production, create a test field on a non-production model, save an object, and verify the object detail page and API representation.
Rollback is straightforward because custom fields are metadata: removing a field deletes its definition and associated values. Plan communication before removal if automation depends on the field.
Actionable closing
If you need lightweight, team-wide operational metadata on existing NetBox objects, start with a small set of custom fields on Device or Prefix, make them filterable, and consume them via the API. Keep the set small, document naming conventions, and validate externally where referential integrity matters. When you outgrow flat attributes, that is the signal to move to a plugin or custom model.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.