MCPcopy Index your code
hub / github.com/bl4ko/netbox-ssot

github.com/bl4ko/netbox-ssot @v1.25.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.25.1 ↗ · + Follow
1,228 symbols 5,023 edges 117 files 389 documented · 32% updated 2d agov1.25.1 · 2026-06-04★ 746 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Netbox-SSOT

Go codecov GitHub last commit GitHub Tag GitHub License

Netbox-ssot is a small but powerful microservice designed to keep your Netbox instance in sync with external data sources.

It is designed to be run as a cronjob, and will periodically update Netbox with the latest data from the external sources. It syncs each source in parallel to speed up the process of syncing.

Currently, the supported external data sources types are:

Compatibility Matrix

[!WARNING] Since netbox introduces breaking changes in minor releases, netbox-ssot also introduces breaking changes in minor releases. See the table below for compatibility between netbox-ssot and netbox.

Version Supported Netbox Version
v1.9.x >= 4.2.0
v1.0.0-v1.8.x >=4.0.0, < 4.2.0
v0.x.x >=3.7.0, < 4.0.0

CLI Flags

Flag Description Default
--config Path to the configuration file config.yaml
--dry-run Preview changes without writing to Netbox false

Dry Run

Use the --dry-run flag to preview what changes would be made to Netbox without actually applying them. All read operations (fetching existing Netbox state, connecting to sources) execute normally, but all write operations (create, update, delete) are intercepted and logged instead.

# Binary
netbox-ssot --config config.yaml --dry-run

# Docker
docker run -v /path/to/config.yaml:/app/config.yaml ghcr.io/bl4ko/netbox-ssot --dry-run

# Kubernetes (one-off Job)
kubectl create job --from=cronjob/netbox-ssot netbox-ssot-dry-run -- /app/netbox-ssot --config /app/config.yaml --dry-run

Look for [DRY-RUN] entries in the log output to see what would change:

INFO DRY-RUN MODE ENABLED: No changes will be written to Netbox
...
INFO [DRY-RUN] Would create objects.Tag at /api/extras/tags/
INFO [DRY-RUN] Would update objects.Device (ID: 42) with: map[name:server01]
INFO [DRY-RUN] Would delete objects.IPAddress (ID: 99) at /api/ipam/ip-addresses/
INFO [DRY-RUN] Would bulk delete 3 objects at /api/dcim/interfaces/
...
INFO DRY-RUN COMPLETE: Review the log above for [DRY-RUN] entries to see what would change

[!NOTE] During a dry run, created objects are assigned fake IDs (starting at 100,000,000) to maintain internal index consistency. These IDs are never written to Netbox.

Configuration

Netbox-ssot is configured via a single yaml file. The configuration file is divided into three sections:

  • logger: Logger configuration
  • netbox: Netbox configuration
  • source: Array of configuration for each data source

Example configuration can be found here.

Logger

Parameter Description Type Possible values Default Required
logger.level Log level int/string [0-3] or [debug,info,warn,error] 1,info No
logger.dest Log output filename. Default "" representing stdout. str Any valid path "" No

Netbox

Parameter Description Type Possible values Default Required
netbox.apiToken Netbox API token str Any valid token "" Yes
netbox.hostname Hostname of your netbox instance (e.g netbox.example.com). str Valid hostname "" Yes
netbox.port Port of your netbox instance. int 0-65536 443 No
netbox.httpScheme HTTP scheme of your netbox instance. str [http, https] https No
netbox.validateCert Validate the TLS certificate of your netbox instance. bool [true, false] false No
netbox.timeout Max timeout for api call of your netbox instance. int >=0 15 No
netbox.removeOrphans If set to true all objects, marked with netbox-ssot tag that were not found during this iteration are automatically deleted. If set to false, objects that were not found are marked with an Orphan tag. We can then use netbox.removeOrphansAfterDays to remove the orphans after n days that they were not seen on the sources. bool [true, false] true No
netbox.removeOrphansAfterDays Specifies the number of days to wait before automatically deleting objects marked as Orphan. This setting is only applicable if netbox.removeOrphans is set to false. A value of 5 means objects are deleted in five days after being marked as Orphan and not found since. int >0 MaxInt No
netbox.tag Tag to be applied to all objects managed by netbox-ssot. string any "netbox-ssot" No
netbox.tagColor TagColor for the netbox-ssot tag. string any "00add8" No
netbox.sourcePriority Array of source names in order of priority. If an object (e.g. Vlan) is found in multiple sources, the first source in the list will be used. []string any [] No
netbox.caFile Path to a self signed certificate for netbox. string Valid path "" No

Source

Parameter Description Source Type Type Possible values Default Required
source.name Name of the data source. all str any "" Yes
source.type Type of the data source. all str [ovirt, vmware, dnac, proxmox, paloalto, fortigate, fmc, ios-xe, f5] "" Yes
source.httpScheme Http scheme for the source all str [ http,https] https No
source.hostname Hostname of the data source. all str any "" Yes
source.port Port of the data source. all int 0-65536 443 No
source.username Username of the data source account. all str any "" Yes
source.password Password of the data source account. all str any "" Yes
source.apiToken API token of the data source account. [fortigate] str any "" Yes
source.validateCert Enforce TLS certificate validation. all bool [true, false] false No
source.tagColor TagColor for the source tag. all string any

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 528
Method 524
Struct 163
TypeAlias 8
Interface 5

Languages

Go100%

Modules by API surface

internal/netbox/objects/dcim.go86 symbols
internal/netbox/inventory/init_items_test.go55 symbols
internal/source/common/utils_test.go53 symbols
internal/netbox/objects/virtualization.go45 symbols
internal/netbox/objects/ipam.go36 symbols
internal/netbox/objects/tenancy.go34 symbols
internal/netbox/inventory/init_items.go34 symbols
internal/netbox/inventory/add_items.go32 symbols
internal/netbox/inventory/add_items_test.go31 symbols
internal/utils/diff_map_test.go30 symbols
internal/netbox/objects/dcim_test.go30 symbols
internal/netbox/objects/generic_objects.go23 symbols

For agents

$ claude mcp add netbox-ssot \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page