Hopwise Labs
Request a pilot
Source of truth

NetBox as a source of truth: what it covers

NetBox is open source software that serves as the source of truth for a network and physical infrastructure: facilities, racks, cabling, power, circuits, IP addresses. It describes the intended state, not the observed one, and doesn’t discover devices, monitor them or push configuration. It stays accurate with one author per data item and regular reconciliation.

NetBox is open source, so installing it costs nothing. The cost is in keeping it accurate.

What is NetBox, and what does “source of truth” mean?

Its introduction page puts it plainly: “NetBox intends to represent the desired state of a network versus its operational state.” Desired means what the team decided, not what is observed on the floor. In the documentation, “source of truth” means exactly that: a repository vetted by people, which the other tools read their data from.

Released in 2016 under the Apache 2 license, the project exists as a community edition, free and self-hosted, and as Cloud and Enterprise editions sold by NetBox Labs. You can try it on a public demo instance. The documentation sets two principles:

  • automated import of live state into it is strongly discouraged;
  • all data must be vetted by a person before it goes in, so that it can then feed monitoring and provisioning with confidence.

What does NetBox model for an infrastructure operator?

NetBox covers the physical layer, the network and the link to customers in one data model. For an operator, the relevant objects are these:

Domain NetBox objects Question it answers
Layout Regions, site groups, sites, locations (floor, room), racks, rack unit reservations Where can a device go, and what is already promised?
Devices Device types, modules, interfaces, console ports, front and rear ports What is this device made of, and what is free on it?
Cabling Cables between components, patch panels via front and rear ports Where does this link run, end to end?
Power Power panels, power feeds, power ports, PDUs and outlets Which feed is this device plugged into, primary or redundant?
Circuits Providers, circuits, A and Z terminations, provider networks Which leased line arrives in which room, and with whom?
Addressing (IPAM) Aggregates, prefixes, IP ranges, IP addresses, VRFs, VLANs, AS numbers Which address is free, and which prefix is full?
Virtualization Clusters, virtual machines, virtual interfaces Which cluster does this machine run on, and for which customer?
Customers Tenants and tenant groups, contacts Which customer owns this rack, this port, this prefix?

Two details bite in operations. A device’s components are copied from its type when the device is created, so editing the type later leaves existing devices unchanged. And each object can belong to only one tenant, so a resource shared between customers should be assigned to none.

For space, power and the remaining capacity of a room, see our guide on DCIM in a data center. NetBox holds the register; the measurements come from elsewhere.

What doesn’t NetBox do?

NetBox doesn’t discover devices, doesn’t monitor them and doesn’t push configuration. Its documentation rules out five uses: monitoring, DNS server, RADIUS server, configuration management and facilities management.

It never talks to devices directly. It serves its data to other tools, and you end up with three versions of the infrastructure:

Version Where it lives What it knows
Intended NetBox What should exist, where, for which customer
Discovered Scans, polling of devices, switch tables What actually responds, with its configuration
Monitored Monitoring tool What is monitored, in what state

A gap between them is something to process. It doesn’t mean anything is down.

What does it take to run NetBox?

NetBox is a Python web application, built on Django, that relies on PostgreSQL for data and on Redis for caching and task queues. The documentation walks through an installation on Ubuntu behind nginx or Apache, and the community project netbox-docker provides a container image. Someone has to operate the instance: pin the version, follow updates, back up the database, test restores.

How do you keep NetBox accurate over time?

NetBox stays accurate if each data item has a single author and a regular reconciliation compares it with discovery and monitoring.

Start by giving each object type one author, and write it down in a short table:

Data Author When
Racks, reservations, physical cabling Installation team When the intervention is closed
Prefixes, addresses, VLANs Network team Before commissioning
Circuits and terminations Network team or purchasing On delivery of the line
Tenant of an object Person who approves the order At reservation

Then reconcile at fixed intervals: compare NetBox with what the switches, monitoring and PDUs see, and turn each gap into a task with an owner. The general method is in our guide CMDB: why it goes wrong and how to keep it up to date.

NetBox itself provides the mechanisms for this:

  • custom fields: they add attributes to objects without touching the schema and appear in the interface and the API;
  • custom scripts: run on demand or on a schedule, they can also check data integrity, for example that each active device has enough power supplies connected;
  • event rules: when an object is created, modified or deleted, they run a script, send a webhook or notify a user;
  • API: reading, creating, modifying and deleting objects, tokens restricted to read-only if needed, and a GraphQL API. The pynetbox Python library, the netbox.netbox Ansible collection (dynamic inventory) and a Terraform provider maintained by E. Breuninger consume it;
  • change log and notes: each change keeps the author, the time and the before and after state; notes (journaling) explain why.

Run a check script without committing changes and it writes nothing. You just get the list of gaps.

What stays manual around NetBox?

The work between the tools. NetBox holds the repository, but requests, tickets and customer notices live elsewhere. Three flows show it:

  1. customer requests: a request for a rack or a port arrives by email or through the customer portal. Someone checks availability in NetBox, reserves, opens the ticket, then updates after the intervention;
  2. tickets: an incident on a device is handled in the ticketing tool. Finding the affected customers means following cables, circuits and tenants through NetBox by hand;
  3. maintenance notices: a provider announces an outage on a circuit. Someone has to trace it back to the devices and customers concerned, then write the notices.

The gaps come from the handoffs: a forgotten reservation, a cable installed but not entered, a customer left out of a notice. Hopwise Labs builds this layer around the source of truth: rule-based reconciliation, an agent only on the ambiguous residue, and a person who approves before anything changes in NetBox.

When do you need a plugin or an in-house tool?

Reach for a plugin when you need new objects in NetBox, and for an in-house tool when the need is a flow across several tools. Before either, check whether a custom field or a script would do.

Need Suitable answer What to know
One more attribute on an existing object Custom field No code, visible in the interface and the API
A check or a bulk creation Custom script Can be run on demand or scheduled
Reacting to a change in another tool Event rule and webhook Processed as a background task by NetBox
An object NetBox does not know (order, contract, intervention) Plugin Adds models and views; cannot modify the core models
A flow that crosses tickets, email, monitoring and NetBox In-house tool that calls the API Has to be maintained: documentation, tests, more than one person who knows it

Recap

NetBox describes the intended state of an infrastructure. It doesn’t discover devices, monitor them or push configuration. It stays accurate with one author per data item, regular reconciliation and corrections approved by a person. What’s left to do by hand sits between NetBox and the other tools.

Frequently asked questions

Can NetBox be used as an IPAM?

Yes. It manages aggregates, prefixes, IP ranges, IP addresses, VRFs, VLANs and AS numbers, and calculates the utilization of each prefix automatically. Its API returns the prefixes and addresses still free within a prefix. It holds the addressing plan but doesn’t talk to the devices; other tools apply it.

Does NetBox discover devices on its own?

No. According to its documentation, NetBox does not interact directly with devices and describes the intended state of the network, not its operational state. Automated import of live state is strongly discouraged: data must be vetted by a person before it goes in.

Does NetBox replace monitoring?

No. Monitoring is one of the uses that the NetBox documentation explicitly excludes, along with DNS server, RADIUS server, configuration management and facilities management. What NetBox can do is give monitoring the list of what to watch.

Can NetBox be used as a DCIM?

For the register part, yes: sites, rooms, racks, rack unit reservations, power panels, power feeds, outlets and cables. It doesn’t measure consumption or temperature, and it has no alarms. Those come from other tools and are reconciled with it.

Do you need a plugin to manage customers in NetBox?

Not to attach them: the tenant model represents a customer or an internal entity, and most objects can be assigned to one. A plugin earns its place when you need to track objects NetBox doesn’t model, such as an order or a contract.

Sources