Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
00f820a
Introcuded an option to disable physical nic updates in Netbox
pto-centrica Feb 26, 2025
92711a9
enhances NetBox version detection #446
bb-Ricardo Mar 20, 2025
720a3ba
fixes issue with retrieving platform name for newer guest tools #448
bb-Ricardo Mar 21, 2025
e325d99
feat: add filters to exclude disk sync for specific VMs
Littlericket Mar 21, 2025
4d222b6
fix: remove duplicated config options in settings-example.ini
Littlericket Mar 21, 2025
edf0495
fix: handle object and multi-object custom fields correctly
Littlericket Mar 21, 2025
7c14187
fixes issue with type hints for python <3.10.0 setups #456
bb-Ricardo May 9, 2025
cee3425
adds distroVersion to VM linux platform #448
bb-Ricardo Jun 17, 2025
1548495
fixes issue with parsing of vm guest data #448
bb-Ricardo Jun 18, 2025
328c70b
only set the Cluster scope_type if the site_name is not None
joachimBurket Jul 3, 2025
94745d0
Merge pull request #469 from joachimBurket/fix/resolve-cluster-withou…
bb-Ricardo Jul 23, 2025
20d356c
Merge pull request #452 from Littlericket/bug-451
bb-Ricardo Jul 23, 2025
1320d81
adds note to readme about sunsetting this project #474
bb-Ricardo Jul 30, 2025
71a8dbf
cluster site now optional, added scope type option. incomplete
Noah418 Aug 21, 2025
c090d83
added debugging logs, for debugging
Noah418 Aug 21, 2025
2d773ba
fix a rather important typo for this bug fix
Noah418 Aug 21, 2025
9b86ccb
added the site_name as a way to set the scope_id and scope_type (as a…
Noah418 Aug 21, 2025
6116302
updated the config option descriptions (written to generated config f…
Noah418 Aug 21, 2025
453f0e5
updated some comments, uncommented some methods. Need to find where s…
Noah418 Aug 21, 2025
a20bd47
updated NBCluster class to allow different scope types
Noah418 Aug 22, 2025
6cd5708
re-added site as an NBCluster attribute to maintain backwards compata…
Noah418 Aug 22, 2025
ac5c334
Added dcim.location and dcim.region as valid options for scope type …
Noah418 Aug 22, 2025
0625c3c
added <NONE> as an option for scope type in config
Noah418 Aug 22, 2025
9a70da1
cleaned up a bit
Noah418 Aug 22, 2025
2c7c3eb
cleaned up some more
Noah418 Aug 22, 2025
7cdcf22
Merge pull request #3 from sol1/468-cluster-without-site-error-update
afoster Aug 25, 2025
b080e44
stops ip addresses assigned to FHRP groups from being reassigned
Noah418 Aug 25, 2025
049655a
worded the log better
Noah418 Aug 25, 2025
5f16691
added skipping_fhrp_group_ips config option to enable or disable fhrp…
Noah418 Aug 25, 2025
960680c
limited skipping_fhrp_group_ips to vmware since I can't test redfish …
Noah418 Aug 25, 2025
dae2911
tweaked comment
Noah418 Aug 25, 2025
21db416
Merge branch 'bb-Ricardo:main' into 445-sync-overwriting-FHRP-Group-a…
Noah418 Aug 25, 2025
b61a34b
limited skip_fhrp_group_ips to vmware since I can't test redfish pres…
Noah418 Aug 25, 2025
b853384
Merge remote-tracking branch 'origin/445-sync-overwriting-FHRP-Group-…
Noah418 Aug 26, 2025
7e0fde9
modified: module/sources/vmware/connection.py
Noah418 Aug 26, 2025
ee80b80
modified: module/sources/vmware/connection.py
Noah418 Aug 26, 2025
0be0669
changed the NBIPAddress data model entry 'assigned_object_type' to ha…
Noah418 Aug 26, 2025
2e3fb45
modified: module/netbox/object_classes.py
Noah418 Aug 26, 2025
6ffa661
modified: module/netbox/object_classes.py
Noah418 Aug 27, 2025
3a22fc2
Undid part of a previous commit, to undo a mistake
Noah418 Aug 28, 2025
3d9a189
Added a dev document for explaining how the code works for the benefi…
Noah418 Aug 28, 2025
3f5af8c
Added/changed where the fhrp group ip address updating prevention occ…
Noah418 Aug 28, 2025
a7acdac
removed the dev doc since it's not related to this bug
Noah418 Aug 28, 2025
11ed756
Removed the last of the unnecessary things (hopefully)
Noah418 Aug 28, 2025
bd3d882
one last tiny thing
Noah418 Aug 28, 2025
409642d
cleanup unnecessary code
Noah418 Aug 29, 2025
1e865b7
removed the readme note not in the dev branch
Noah418 Aug 29, 2025
c04587c
Merge pull request #6 from sol1/445-sync-overwriting-FHRP-Group-assig…
afoster Sep 1, 2025
e0ccb0c
Merge branch 'bb-Ricardo:main' into main
pertoft Nov 26, 2025
ab0b583
add hetzner source
SerhiiZahuba Feb 13, 2026
0d037c2
Add descriptions to Hetzner source config options
SerhiiZahuba Mar 16, 2026
19ca1bb
removes python 3.6 informations and bumps minimum python version to 3.12
bb-Ricardo Mar 18, 2026
29d9059
Merge branch 'main' into main
bb-Ricardo Mar 18, 2026
8b93942
Merge branch 'sol1-468-review' into development
bb-Ricardo Mar 18, 2026
9e0b5cd
fixes indentations and adds updated default settings
bb-Ricardo Mar 18, 2026
fa494df
stops ip addresses assigned to FHRP groups from being reassigned
Noah418 Aug 25, 2025
61379d9
worded the log better
Noah418 Aug 25, 2025
df8ed8d
added skipping_fhrp_group_ips config option to enable or disable fhrp…
Noah418 Aug 25, 2025
cf81cd4
limited skip_fhrp_group_ips to vmware since I can't test redfish pres…
Noah418 Aug 25, 2025
0468d81
limited skipping_fhrp_group_ips to vmware since I can't test redfish …
Noah418 Aug 25, 2025
8672205
tweaked comment
Noah418 Aug 25, 2025
b8607b5
modified: module/sources/vmware/connection.py
Noah418 Aug 26, 2025
0c4aa28
modified: module/sources/vmware/connection.py
Noah418 Aug 26, 2025
7ec8fef
changed the NBIPAddress data model entry 'assigned_object_type' to ha…
Noah418 Aug 26, 2025
b452576
modified: module/netbox/object_classes.py
Noah418 Aug 26, 2025
a53ff3a
modified: module/netbox/object_classes.py
Noah418 Aug 27, 2025
a0ca74a
Undid part of a previous commit, to undo a mistake
Noah418 Aug 28, 2025
ab7c6d0
Added a dev document for explaining how the code works for the benefi…
Noah418 Aug 28, 2025
4879273
Added/changed where the fhrp group ip address updating prevention occ…
Noah418 Aug 28, 2025
732e9b4
removed the dev doc since it's not related to this bug
Noah418 Aug 28, 2025
0f15a5d
Removed the last of the unnecessary things (hopefully)
Noah418 Aug 28, 2025
02a14c0
one last tiny thing
Noah418 Aug 28, 2025
b46a844
cleanup unnecessary code
Noah418 Aug 29, 2025
441ee7c
adds sample config and fixes some linting issues
bb-Ricardo Mar 18, 2026
e70c610
Merge pull request #493 from SerhiiZahuba/main
bb-Ricardo Mar 19, 2026
026c918
adds CODEOWNERS
bb-Ricardo Mar 19, 2026
63f61db
feat: add support for NetBox 4.5+ v2 API tokens
Apr 4, 2026
f3894c1
fix: move v2 token comment to config.py and regenerate settings-example
Apr 5, 2026
30af617
Merge pull request #500 from dsvetlov/feature/netbox-4.5-v2-token-sup…
bb-Ricardo Apr 7, 2026
a66dc2c
bumps dependencies
bb-Ricardo May 13, 2026
c6993ae
moves to vcf-sdk and bumps docker python version to 3.14
bb-Ricardo May 13, 2026
b4453ba
fixes issue with revers lookups and python 3.14 #499
bb-Ricardo May 16, 2026
e0d3362
Add orphaned_device_status and orphaned_vm_status config options
berlikm Jul 10, 2026
a077414
adds vm_interface_exclude_filter and host_interface_exclude_filter op…
eric-eisenhart Jul 23, 2026
e055c7e
fixes primary IP matching for resolved IP address objects
eric-eisenhart Jul 23, 2026
cdde020
adds vm_status_on_create and vm_status_preserve options
eric-eisenhart Jul 23, 2026
ea6efd6
fixes object/multi-object custom field handling for NetBox 4.x
eric-eisenhart Jul 24, 2026
2961000
uses single IPv4 address as primary IPv4 fallback
eric-eisenhart Jul 25, 2026
29f2d06
adds preserve_primary_ips option
eric-eisenhart Jul 25, 2026
a78defa
vmware: add tag_name_include_category option
ifrantic Jul 28, 2026
4397f23
fixes crash when a VLAN group relation is unresolved
tempalov Jul 30, 2026
3c74a13
vmware: add match_vm_by_serial/mac_address/ip_address options
remote24 Aug 6, 2026
23f814a
feat(VMware): Create NetBox cables from ESXi CDP/LLDP neighbors
Aug 22, 2026
b8e402f
adds optional sync of VMware Tools guest hostname to a NetBox VM cust…
muratbulat Aug 29, 2026
170af9d
Fix skip_fhrp_group_ips unbinding all interface IPs and py<3.12 syntax
semx Sep 1, 2026
503491b
Merge branch 'development' into fix/445-fhrp-ip-binding
bb-Ricardo Sep 2, 2026
437d0ff
bumps idna to 3.15 and setuptools to 83.0.0
semx Sep 2, 2026
fdffd84
hetzner: stop logging the API token
semx Sep 2, 2026
e8e9a0a
Merge pull request #539 from bb-Ricardo/fix/hetzner-token-logged
bb-Ricardo Sep 2, 2026
6806f7f
adds a vcsim based test suite and runs it in CI
semx Sep 2, 2026
aca265a
makes the suite importable when pytest is run as a plain command
semx Sep 2, 2026
f527f4c
fixes paginated list requests silently skipping rows
marcinpsk Sep 3, 2026
dc29865
stops structured values being stringified into component names
marcinpsk Sep 3, 2026
62bf609
stops orphan tagging check_redfish inventory items the source still m…
marcinpsk Sep 3, 2026
b4356c7
fix: drop stale FHRP skip that unbound regular IPs by inventory order…
semx Sep 7, 2026
e59d081
Merge pull request #541 from bb-Ricardo/test/vcsim-harness
Sep 7, 2026
e1c5633
Merge pull request #540 from bb-Ricardo/deps/idna-3.15-setuptools-83.0.0
Sep 7, 2026
f961860
Merge pull request #538 from bb-Ricardo/fix/445-fhrp-ip-binding
Sep 7, 2026
ce6182e
Merge pull request #543 from marcinpsk/fix/paginated-list-ordering
Sep 7, 2026
61782a8
Merge pull request #544 from marcinpsk/fix/structured-values-in-names
Sep 7, 2026
2792944
Merge pull request #545 from marcinpsk/fix/check-redfish-orphan-tagging
Sep 7, 2026
5a269e4
fix: identify env sources by NBS_SOURCE_<index>_NAME only (#517)
semx Sep 9, 2026
eccc931
Merge pull request #530 from tempalov/fix/vlan-group-unresolved-dict
Sep 9, 2026
a534ac7
Merge pull request #523 from sonic-com/pr/primary-ip-matching
Sep 9, 2026
80429cc
Merge pull request #524 from sonic-com/pr/object-custom-field-types
Sep 9, 2026
5a7f6f1
Merge pull request #526 from sonic-com/pr/single-ipv4-primary-fallback
Sep 9, 2026
9beaa15
test: cover VLAN lookup with an unresolved group dict (#529)
semx Sep 9, 2026
7fd4f23
Merge pull request #525 from sonic-com/pr/preserve-primary-ips
Sep 9, 2026
4a105ef
Merge pull request #527 from sonic-com/pr/interface-exclude-filter
Sep 9, 2026
3db6ac9
Merge pull request #547 from bb-Ricardo/fix/env-source-discovery
Sep 9, 2026
d07f413
Merge pull request #548 from bb-Ricardo/test/vlan-group-unresolved
Sep 9, 2026
e1f45e8
fix: accept an API token that already carries its scheme (#513)
semx Sep 9, 2026
111ea6b
Merge pull request #549 from bb-Ricardo/fix/api-token-scheme-prefix
Sep 9, 2026
35f7aac
moves the check_redfish test source builder into a fixture
marcinpsk Sep 7, 2026
1c1ce98
keeps management IPs on interfaces the source discovered no IPs for
marcinpsk Sep 3, 2026
c710d0e
adds opt-in to use the Dell Service Tag as the device serial
marcinpsk Sep 3, 2026
ab55df8
adds option to model check_redfish components as NetBox modules
marcinpsk Sep 9, 2026
d9056ff
Merge pull request #546 from marcinpsk/test/check-redfish-source-fixture
Sep 9, 2026
bcf1494
Merge pull request #550 from marcinpsk/fix/keep-undiscovered-ips
Sep 9, 2026
254a914
Merge pull request #551 from marcinpsk/feature/dell-serial-from-servi…
Sep 9, 2026
e656875
fix: parse reevaluated VMs once and reuse their MAC objects (#542)
semx Sep 9, 2026
b733e3d
Merge pull request #532 from remote24/fix/vm-cross-cluster-matching-f…
Sep 9, 2026
0ed4680
Merge pull request #442 from pertoft/main
Sep 9, 2026
864969e
Merge pull request #536 from muratbulat/feature/vmware-guest-hostname…
Sep 9, 2026
48def68
docs: fix typos in the skip_host_nics description
semx Sep 9, 2026
a700664
Merge #450 (vm_exclude_disk_sync options) onto development
semx Sep 9, 2026
0dc493e
Merge pull request #554 from bb-Ricardo/pr450-rebased
Sep 9, 2026
21818d3
fix: skip_host_nics must skip only the physical interfaces, not the host
semx Sep 9, 2026
f4a8b79
docs: describe what happens to existing pNICs when skip_host_nics is …
semx Sep 9, 2026
e76db2d
Merge pull request #555 from bb-Ricardo/fix/skip-host-nics
Sep 9, 2026
b3333e0
fix: keep an existing device type when the host reports a placeholder…
semx Sep 9, 2026
0e8e633
fix: validate permitted_subnets loudly and accept a YAML list
semx Sep 9, 2026
054ca1b
Merge pull request #556 from bb-Ricardo/fix/host-device-type-placeholder
Sep 9, 2026
90cac32
Merge pull request #558 from bb-Ricardo/fix/permitted-subnets-config-…
Sep 9, 2026
42c4781
Merge pull request #553 from bb-Ricardo/fix/reevaluated-vm-mac-duplic…
Sep 9, 2026
947747c
Merge pull request #552 from marcinpsk/feature/check-redfish-modules
semx Sep 9, 2026
16bdb11
test: cover track_vm_host and name the NetBox field it fills
semx Sep 9, 2026
6c69119
Merge pull request #561 from bb-Ricardo/fix/track-vm-host-docs
Sep 9, 2026
de85304
Merge branch 'pr514' into agent514
semx Sep 9, 2026
beae1ad
Merge branch 'pr518' into feature/vcenter-tag-category
semx Sep 9, 2026
09a54e7
Merge branch 'pr535' into agent535
semx Sep 9, 2026
295c3ca
vmware: keep the category lookup and tag name change under the option
semx Sep 9, 2026
e6d283a
vmware: leave both VM status options unset by default
semx Sep 9, 2026
a23684b
Merge pull request #562 from bb-Ricardo/feature/vcenter-tag-category
Sep 9, 2026
ce3dc23
Merge pull request #563 from bb-Ricardo/feature/vm-status-options
Sep 9, 2026
3bbac67
netbox: only restore a status this program set while the object was o…
semx Sep 9, 2026
4bd9626
Merge remote-tracking branch 'origin/development' into agent514
semx Sep 9, 2026
cf09258
Merge remote-tracking branch 'origin/development' into agent535
semx Sep 9, 2026
56d9479
Merge pull request #564 from bb-Ricardo/feature/orphaned-object-status
Sep 9, 2026
e36e7fe
Merge remote-tracking branch 'origin/development' into agent535
semx Sep 10, 2026
3beb9c9
vmware: put CDP/LLDP cable sync behind sync_host_cables and harden it
semx Sep 10, 2026
fb701fb
fix: scope a cluster with the site object so NetBox accepts it
semx Sep 10, 2026
7c00552
Merge pull request #566 from bb-Ricardo/fix/cluster-scope-id
Sep 10, 2026
197b5f9
Merge remote-tracking branch 'origin/development' into modules-e2e
semx Sep 10, 2026
6156a2e
check_redfish: read modules back from NetBox and type them by hardwar…
semx Sep 10, 2026
75ad16f
fix: don't treat guest-tools-running-but-empty guest.net as authorita…
Jul 28, 2026
fbc387f
vmware: keep IPs when guest tools report no interface at all
semx Sep 10, 2026
e7edb96
Merge pull request #567 from bb-Ricardo/feature/vmware-guest-net-guard
Sep 10, 2026
1c7552d
check_redfish: stop syncing the live fan reading
semx Sep 10, 2026
04e5580
Merge pull request #568 from bb-Ricardo/fix/fan-speed-churn
Sep 10, 2026
263e6b5
fix: do not adopt a same-named cluster another source keeps in a diff…
semx Sep 14, 2026
45c0b31
fixes small formatting errors and adds autogenerated example config
bb-Ricardo Sep 14, 2026
2be9e3d
adds optional pytest dependency
bb-Ricardo Sep 14, 2026
55621a0
fix: assign addresses with a non-unique role to every interface (#344)
semx Sep 9, 2026
452fb4d
check_redfish: always read modules back so module relations resolve
semx Sep 15, 2026
7c443c8
ci: bump docker workflow action versions
rizlas Sep 24, 2026
2fff297
Merge pull request #506 from rizlas/development
rizlas Sep 24, 2026
8871ef6
Merge pull request #559 from bb-Ricardo/fix/non-unique-ip-roles
semx Sep 27, 2026
e7fbef5
Merge pull request #560 from bb-Ricardo/feature/check-redfish-modules
semx Sep 27, 2026
9a9c6cf
Merge branch 'development' into feature/host-cdp-lldp-cables
semx Sep 27, 2026
e0db01b
Merge pull request #565 from bb-Ricardo/feature/host-cdp-lldp-cables
semx Sep 27, 2026
7f76672
change copyright notice to netbox-sync team
bb-Ricardo Sep 30, 2026
a5b1570
bumps version and dependencies
bb-Ricardo Sep 30, 2026
7147c14
docs: point the image address at the GitHub Container Registry (#571)
semx Oct 1, 2026
8ce1d78
vmware: name vcf-sdk as the tag sync dependency (#572)
semx Oct 1, 2026
835e439
set_version.sh: search for the new copyright holder (#574)
semx Oct 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
uses: actions/checkout@v6

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Lower case docker image name
id: docker_image
uses: ASzc/change-string-case-action@v6
uses: ASzc/change-string-case-action@v8
with:
string: ${{ github.repository }}

Expand All @@ -46,7 +46,7 @@ jobs:
replace: ${{ vars.DOCKER_HUB_USERNAME }}

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -71,7 +71,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}

- name: Log in to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ vars.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Test

on:
push:
branches: [ "main", "development" ]
pull_request:
branches: [ "main", "development" ]
workflow_dispatch:

permissions:
contents: read

jobs:
pytest:
runs-on: ubuntu-latest

env:
# vcsim serves the captured vCenter inventories in tests/fixtures/vcsim
GOVMOMI_VERSION: v0.56.0

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: pip

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest

- name: Install vcsim
run: |
curl -fsSL -o vcsim.tar.gz \
"https://github.com/vmware/govmomi/releases/download/${GOVMOMI_VERSION}/vcsim_Linux_x86_64.tar.gz"
tar -xzf vcsim.tar.gz vcsim
sudo install -m 0755 vcsim /usr/local/bin/vcsim
vcsim -h 2>&1 | head -1 || true

- name: Run tests
run: pytest -v
6 changes: 6 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

* @bb-ricardo


/sources/hetzner/ @SerhiiZahuba
docs/source_hetzner.md @SerhiiZahuba
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
FROM python:3.13-slim AS builder
FROM python:3.14-slim AS builder

COPY requirements.txt .

ARG VENV=/opt/netbox-sync/venv

# Install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends git gcc libc-dev && \
RUN apt-get update && \
rm -rf /var/lib/apt/lists/* && \
python3 -m venv $VENV && \
$VENV/bin/python3 -m pip install --upgrade pip && \
$VENV/bin/pip install -r requirements.txt && \
$VENV/bin/pip install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git && \
$VENV/bin/pip install --upgrade vcf-sdk && \
find $VENV -type d -name "__pycache__" -print0 | xargs -0 -n1 rm -rf

FROM python:3.13-slim AS netbox-sync
FROM python:3.14-slim AS netbox-sync

ARG VENV=/opt/netbox-sync/venv

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 - 2025 Ricardo Bartels
Copyright (c) 2020 - 2026 netbox-sync team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
51 changes: 29 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# NetBox-Sync

This is a tool to sync data from different sources to a NetBox instance.
Expand Down Expand Up @@ -30,14 +29,8 @@ This ensures stale objects are removed from NetBox keeping an accurate current s

## Requirements
### Software
* python >= 3.6
* packaging
* urllib3==2.2.1
* wheel
* requests==2.31.0
* pyvmomi==8.0.2.0.1
* aiodns==3.0.0
* pyyaml==6.0.1
* python >= 3.12
* see [requirements.txt](requirements.txt)

### Environment
* NetBox >= 2.9
Expand All @@ -49,20 +42,17 @@ This ensures stale objects are removed from NetBox keeping an accurate current s
# Installing
* here we assume we install in ```/opt```

## RedHat based OS
* on RedHat/CentOS 7 you need to install python3.6 and pip from EPEL first
* on RedHat/CentOS 8 systems the package name changed to `python3-pip`
## RedHat based distributions
```shell
yum install python36-pip
yum install python3-pip
```

## Ubuntu 18.04 & 20.04 && 22.04
## Debian (Ubuntu) based distributions
```shell
apt-get update && apt-get install python3-venv
```

## Clone repo and install dependencies
* If you need to use python 3.6 then you would need `requirements_3.6.txt` to install requirements
* download and setup of virtual environment
```shell
cd /opt
Expand All @@ -76,10 +66,10 @@ pip3 install -r requirements.txt || pip install -r requirements.txt
```

### VMware tag sync (if necessary)
The `vsphere-automation-sdk` must be installed if tags should be synced from vCenter to NetBox
The `vcf-sdk` must be installed if tags should be synced from vCenter to NetBox
* assuming we are still in an activated virtual env
```shell
pip install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git
pip install --upgrade vcf-sdk
```

## NetBox API token
Expand All @@ -88,6 +78,8 @@ In order to updated data in NetBox you need a NetBox API token.
* auth
* secrets
* users
* Both v1 (legacy) and v2 tokens (NetBox 4.5+, `nbt_` prefix) are supported.
The correct authorization header (`Token` or `Bearer`) is detected automatically.

A short description can be found [here](https://docs.netbox.dev/en/stable/integrations/rest-api/#authentication)

Expand All @@ -99,7 +91,7 @@ usage: netbox-sync.py [-h] [-c settings.ini [settings.ini ...]] [-g]

Sync objects from various sources to NetBox

Version: 1.8.1 (2026-03-18)
Version: 1.9.0 (2026-09-30)
Project URL: https://github.com/bb-ricardo/netbox-sync

options:
Expand Down Expand Up @@ -215,21 +207,25 @@ In Order to sync all items regularly you can add a cron job like this one

## Docker

Run the application in a docker container. You can build it yourself or use the ones from docker hub.
Run the application in a docker container. You can build it yourself or use the published images.

Available here: [ghcr.io/bb-ricardo/netbox-sync](https://github.com/bb-Ricardo/netbox-sync/pkgs/container/netbox-sync)

Available here: [bbricardo/netbox-sync](https://hub.docker.com/r/bbricardo/netbox-sync)
Images used to be published on Docker Hub as [bbricardo/netbox-sync](https://hub.docker.com/r/bbricardo/netbox-sync).
v1.9.0 is the last release pushed there; later releases are only published on the GitHub Container Registry,
so switch the pull address to `ghcr.io/bb-ricardo/netbox-sync`.

* The application working directory is ```/app```
* Required to mount your ```settings.ini```

To build it by yourself just run:
```shell
docker build -t bbricardo/netbox-sync:latest .
docker build -t ghcr.io/bb-ricardo/netbox-sync:latest .
```

To start the container just use:
```shell
docker run --rm -it -v $(pwd)/settings.ini:/app/settings.ini bbricardo/netbox-sync:latest
docker run --rm -it -v $(pwd)/settings.ini:/app/settings.ini ghcr.io/bb-ricardo/netbox-sync:latest
```

## Kubernetes
Expand Down Expand Up @@ -295,6 +291,17 @@ Check out the documentations for the different sources
* [vmware](https://github.com/bb-Ricardo/netbox-sync/blob/main/docs/source_vmware.md)
* [check_redfish](https://github.com/bb-Ricardo/netbox-sync/blob/main/docs/source_check_redfish.md)

### Filtering
netbox-sync provides various filtering capabilities to control what objects are synced from sources to NetBox:

1. **General VM filtering**: Use `vm_include_filter` and `vm_exclude_filter` to include or exclude VMs by name.
2. **Tag-based VM filtering**: Use `vm_exclude_by_tag_filter` to exclude VMs with specific vCenter tags.
3. **Partial information filtering**:
- Use `vm_exclude_disk_sync` to exclude disk synchronization for VMs matching specific name patterns.
- Use `vm_exclude_disk_sync_by_tag` to exclude disk synchronization for VMs with specific vCenter tags.

These filters allow for fine-grained control over what information is synchronized, helping to avoid clutter in the change log from temporary or backup-related disk changes.

If you have multiple vCenter instances or check_redfish folders just add another source with the same type
in the **same** file.

Expand Down
12 changes: 12 additions & 0 deletions docs/source_hetzner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Source: hetzner

## Setup
You need to have a source section in your `settings.ini` file with following type:
```ini
type = hetzner
```


### Hetzner api
You need to create a "Read-only" api_token
https://docs.hetzner.com/cloud/api/getting-started/generating-api-token/
96 changes: 96 additions & 0 deletions docs/source_vmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,99 @@ Primary IPv4/6 will be determined by interface that provides the default route f

**Note:**<br>
IP address information can only be extracted if guest tools are installed and running.

#### 6. Sync VMware Tools guest hostname to a custom field

The vCenter VM name (used as the NetBox VM `name`) and the hostname reported from inside the
guest OS by VMware Tools are not always identical. This can happen if:
* a VM was renamed in vCenter but the OS hostname was not changed (or vice versa)
* an OS administrator changed the hostname without informing the virtualization team
* a VM was cloned and the guest hostname was not adjusted afterwards

To make this drift visible in NetBox, the option `vm_guest_hostname_custom_field` can be set to
the name of a NetBox custom field. If set, the guest hostname reported by VMware Tools (vCenter
property `guest.hostName`) is synced into that custom field on every synced VM, while the NetBox
VM `name` keeps reflecting the vCenter inventory name unchanged. This allows administrators to
compare the NetBox VM name against the custom field value on the same VM record to spot naming
drift.

```ini
vm_guest_hostname_custom_field = vmware_guest_hostname
```

If the custom field does not exist in NetBox yet it will be created automatically (type `Text`,
assigned to the `Virtual Machine` object type), the same way other custom fields managed by
netbox-sync (e.g. `vcsa_*` custom attributes) are created. An administrator can also pre-create
the field beforehand; netbox-sync will then just use the existing field.

This option is unset by default, so the feature is disabled and no additional custom field is
created unless explicitly configured.

VMware Tools may not always report a hostname, for example if Tools are not installed, not
running, outdated, or simply have not reported guest information yet. In that case
netbox-sync leaves the custom field untouched and keeps the last known value, instead of
clearing it. A message is logged at debug level (`-l DEBUG2`) whenever this happens.

Example result in NetBox for a VM named `APPPRD01` in vCenter whose guest OS reports
`appprd01.corp.example.com` as its hostname:

```text
Virtual Machine Name: APPPRD01
Custom Fields:
VMware Guest Hostname: appprd01.corp.example.com
```

### Cables to CDP/LLDP neighbors

An ESXi host reports the switch and the switch port each of its physical interfaces (pNICs) is
connected to, if CDP or LLDP is enabled on the switch. With the option `sync_host_cables` enabled
netbox-sync uses this information to create cables in NetBox between the host interface and the
switch port.

```ini
sync_host_cables = True
```

Cables are objects which are usually maintained by hand, that's why this option is disabled by
default. With the option disabled no cable is read from or written to NetBox at all. NetBox 3.3 or
newer is needed, on older versions the option is ignored.

netbox-sync only connects things it can find, it never creates the other end of a cable:

* the device the neighbor reports as its system name must already exist in NetBox. The name is
matched exactly first, a short name is only matched against a FQDN if that match is unambiguous
* the port the neighbor reports must already exist as an interface of that device. Long and short
interface names are matched against each other, so a reported `FastEthernet0/16` also matches an
interface named `Fa0/16` in NetBox. CDP reports the port ID, LLDP additionally reports a port
description and both are tried
* both interfaces must already exist in NetBox. An interface which was just discovered gets its
cable during the next run
* neither of the two interfaces may be connected already. A cable which was created by hand or which
connects to a different port is never changed or deleted, it is reported at log level `DEBUG`
instead

Cables created by this source are tagged like every other object and are marked as orphaned and
pruned once the host stops reporting that neighbor (see `prune_enabled`). Disabling the option again
leaves all previously created cables untouched in NetBox.

### Filtering VM Disk Information
VM disks are synchronized between vCenter and NetBox. Since NetBox 3.7.0, virtual disks are tracked as separate objects
linked to VMs. In some scenarios, such as when temporary disks are attached to VMs during backup operations
(e.g., "Independent-nonpersistent" disks from Veeam), you might want to exclude these changes from synchronization
to avoid cluttering your NetBox change log.

You can use the following filter options to exclude disk synchronization for specific VMs:

1. **`vm_exclude_disk_sync`**: A regex pattern matching VM names where disk synchronization should be excluded.
```ini
vm_exclude_disk_sync = backup-.*, veeam-.*
```

2. **`vm_exclude_disk_sync_by_tag`**: A comma-separated list of vCenter tags. VMs with any of these tags will have
their disk information excluded from synchronization.
```ini
vm_exclude_disk_sync_by_tag = backup-vm, veeam-job
```

When a VM matches these filters, it will still be synchronized to NetBox with all its other information
(CPU, memory, interfaces, IP addresses, etc.), but changes to disk information will be ignored.
2 changes: 1 addition & 1 deletion k8s-netbox-sync-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
spec:
containers:
- name: netbox-sync
image: bbricardo/netbox-sync:latest
image: ghcr.io/bb-ricardo/netbox-sync:latest
imagePullPolicy: IfNotPresent
args:
- -c
Expand Down
6 changes: 3 additions & 3 deletions module/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020 - 2026 Ricardo Bartels. All rights reserved.
# Copyright (c) 2020 - 2026 netbox-sync team. All rights reserved.
#
# netbox-sync.py
#
# This work is licensed under the terms of the MIT license.
# For a copy, see file LICENSE.txt included in this
# repository or visit: <https://opensource.org/licenses/MIT>.

__version__ = "1.8.1"
__version_date__ = "2026-03-18"
__version__ = "1.9.0"
__version_date__ = "2026-09-30"
__author__ = "Ricardo Bartels <ricardo.bartels@telekom.de>"
__description__ = "NetBox Sync"
__license__ = "MIT"
Expand Down
Loading
Loading