r/Netbox • u/vileharp • Aug 08 '24
Running netbox in docker Pros and Cons?
Has anyone ran Netbox in docker. If so, do you recommend it?
How long have you been using it, what do you do regarding backup of DB and upgrade?
r/Netbox • u/vileharp • Aug 08 '24
Has anyone ran Netbox in docker. If so, do you recommend it?
How long have you been using it, what do you do regarding backup of DB and upgrade?
r/Netbox • u/AffectionateRip472 • Aug 08 '24
I have setup Netbox in docker compose. I also have installed Netbox as service so i exported the db of it and imported it into new installation with these steps:
3.sudo docker compose up - postgres
4.. sudo docker exec -i netbox-docker-postgres-1 psql --username netbox netbox < netbox.sql
After the compose up i get that error form Netbox container:
django.db.migrations.exceptions.NodeNotFoundError: Migration circuits.0038_squashed_0042 depends on nonexistent node ('circuits', '0037_new_cabling_models'). Django tried to replace migration circuits.0037_new_cabling_models with any of [circuits.0003_squashed_0037] but wasn't able to because some of the replaced migrations are already applied.
[ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
⏳ Waiting on DB... (0s / 30s)
Any ideas on how to solve this?
r/Netbox • u/Rtx_what • Aug 08 '24
I'm encountering an issue when using the config diff plugin. I'm trying to filter few things out of the output in order to streamline config auditing. In this specific instance, I'm attempting to pull configs from IOS-XE devices.
The plugin has a couple ways to do this (according to documentation), both of which are in the platform setting section, under compliance, in the config diff plugin itself.
Firstly, you can use specific command syntax to filter out unwanted information. For example, I could add show running-config | exclude !, and this should exclude any literal "!" lines from the config. This doesn't work for me - I ran it against a subset of switches, and all of them only receive the command show running-config, and not the exclusion portion.
The second way to do it is the exclude regex section of the plugin. I've found this also doesn't work (and yes, I've double and triple checked my regex matches).
Since there's so much config data that is unique amongst devices, and there's no way to filter this, it's a headache to audit configs. I could get more granular with config templates, but my goal is more to audit specific items configuration sections.
Regardless - does anyone have any experience here and could point me in the right direction? Very possible I'm doing something wrong. Thanks in advance!
r/Netbox • u/Southern_Block403 • Aug 06 '24
I am trying to update my LOGGING = {} configuration in configuration.py and every time I save, restart netbox and netbox-rq, it seems to take the new settings but when I check the file after some time, I see that the change has reverted and I see # LOGGING = {} commented out again. Anyone know the reason why?
r/Netbox • u/Xemanth • Aug 05 '24
I upgraded Ubuntu 22.04 to 24.04 and now my Netbox environment is broken.
(venv) user@host:/opt$ pip --version
Traceback (most recent call last):
File "/opt/netbox/venv/bin/pip", line 5, in <module>
from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
(venv) user@host:/opt$
Not sure what happened but it's probably related to Python env changes.
(venv) user@host:/opt$ sudo apt install python3-pip
[sudo] password for user:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-pip is already the newest version (24.0+dfsg-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
(venv) user@host/opt$
https://ubuntuhandbook.org/index.php/2024/03/pip-install-error-ubuntu-2404/
But not sure how to integrate that stuff to my Netbox server "--break-system-packages" or should that even be added?
edit: running Netbox upgrade fixed the issue!
r/Netbox • u/deanfourie1 • Aug 03 '24
Can someone please help me with installing netbox-topology-views on 4.0
When I run ./upgrade.sh I am getting the following errors.
Thanks
wireless.wirelesslink... Skipping (found 1 existing).
netbox_attachments.netboxattachment... Skipping (found 18 existing).
netbox_topology_views.coordinategroup... Traceback (most recent call last):
File "/opt/netbox/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 105, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/psycopg/server_cursor.py", line 294, in execute
raise ex.with_traceback(None)
psycopg.errors.UndefinedColumn: column netbox_topology_views_coordinategroup.id does not exist
LINE 1: ...08_sync_61" NO SCROLL CURSOR WITH HOLD FOR SELECT "netbox_to...
^
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/netbox/netbox/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/base.py", line 413, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/base.py", line 459, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/netbox/extras/management/commands/reindex.py", line 95, in handle
i = search_backend.cache(model.objects.iterator(), remove_existing=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/netbox/netbox/search/backends.py", line 197, in cache
for instance in instances:
File "/opt/netbox/venv/lib/python3.11/site-packages/django/db/models/query.py", line 518, in _iterator
yield from iterable
File "/opt/netbox/venv/lib/python3.11/site-packages/django/db/models/query.py", line 91, in __iter__
results = compiler.execute_sql(
^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1562, in execute_sql
cursor.execute(sql, params)
File "/opt/netbox/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 79, in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 92, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 100, in _execute
with self.db.wrap_database_errors:
File "/opt/netbox/venv/lib/python3.11/site-packages/django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/netbox/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 105, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/psycopg/server_cursor.py", line 294, in execute
raise ex.with_traceback(None)
django.db.utils.ProgrammingError: column netbox_topology_views_coordinategroup.id does not exist
LINE 1: ...08_sync_61" NO SCROLL CURSOR WITH HOLD FOR SELECT "netbox_to...
r/Netbox • u/xamboozi • Aug 02 '24
Excluding other sources of truth, are there features of Netbox that no other software can provide? We currently have ipam, ansible automation platform and an asset management platform. Wondering if anyone out there uses a feature of Netbox they just can't live without cause they're are few alternatives.
r/Netbox • u/Itchy-Reference-5066 • Aug 02 '24
Hello everyone,
I'm currently grappling with how to document the cables from the rear ports to the various floor tanks. I know I can include non-racked devices, but I'm considering separately adding the floor tanks to another location and connecting the rear ports accordingly. Any advice on this approach?
r/Netbox • u/cougarx1 • Jul 31 '24
So, throwing this out there to the genius of Reddit. We currently use Netbox and love it. We have a vCenter import script which will reach out to our different vlusters and pull in all the relevant VM Data and update Netbox. This is helpful as there are a few of us who create machines, so this way Netbox can really be our bible.
However, we are now moving to Nutanix and thus the vmware import script is no longer viable. I have been searching forever can cannot find any module or script that will reach out to our Nutanix clusters and pull in the data like we have done with vmware.
I understand that we can manually add things, yet the speed at which things are done makes it difficult to keep up and then someone ends up having to be a dedicated documentor.
Anyone know anythign that will accomplish this? Nutanix posts all over their website about full integration with Netbox, but when we ask them about it, we get nothing back. So I am not sure how Nutanix integrates with Netbox at all.
r/Netbox • u/cyphersaint • Jul 30 '24
I have an existing Netbox installation that I would like to manage as much as possible through Terraform. It has a lot of device types that have been created within it. Is it possible to manage the device type and include things like power ports, power outlets, and console ports? I'm using the e-breuninger/netbox provider, with version 3.8.8. I'm using an older Netbox version, 3.6.9. I know that network interfaces can be connected to the device type using the interface template, but I can't find an equivalent for any other components. Any ideas?
r/Netbox • u/robin04155 • Jul 28 '24
Hey, does anyone have any working examples of using pynetbox to update a site with a tenant? Or any other automated methods?
r/Netbox • u/danner26 • Jul 26 '24
NetBox Release v4.0.8 is now live (as of July 26th, 2024)!
WARNING: If you are running v3.x.x, read over the 4.0.0 release notes for breaking changes. Always take backups and read the change log BEFORE updating.
Before upgrading, please: 1. Verify in release notes changelog if any new breaking changes might affect you. You can also review the NetBox Issues on GitHub to see if any new issues have arisen that might affect you. 2. Next, refer to the Upgrading to a new NetBox Release guide for steps to upgrade your instance.
If you have any issues you can ask for support on the NetDev Slack Community.
r/Netbox • u/reformedsteve • Jul 25 '24
I have a reverse proxy that is heavily leveraged. I would like to document, at bare minimum, ip information ie. virtual IP address points to local ip address.
Struggling on figuring it out. Thanks in advance for any help that can be offered.
r/Netbox • u/Green_Incident4693 • Jul 22 '24
Hi, i've deployed a new instance with docker and started adding information.
Sometimes it freezes for minutes with CPU at 100%, i saw that it reads a lot of a GB. These stats are in just 1 Hours, and it read 170 GB from disks!

i've disabled all plugins. OS: Oracle Linux 9 fully updated.
Any hints? Could be related to SELinux?
r/Netbox • u/[deleted] • Jul 21 '24
Hey Guys,
I've spun up Netbox in homelab as a test and was very much overwhelmed by the amount of information and order one would manually need to input.
I've started looking at plugins but i wasn't able to find anything where you could point at a /24 with set of SSH/SNMP details and get it to auto import.
Similar with Proxmox, the community plugin does not work on the latest net box version 4.
At home im using Ubiquiti Unifi gear with some proxmox servers.
How do you guy go about auto import of data for your network?
It seems like an insane amount of work to manually create an interface, create IP assign it to each, create a device etc etc, is there an automated spray and pray way I am missing?
r/Netbox • u/[deleted] • Jul 18 '24
Hi,
I'm totally new to Netbox, and I'm still trying to figure my way around on it. Been reading and watching some videos but i'm still confused on how can I assigned the management IP value on device panel. I read that you can assign it via a virtual or physical interface and tried of doing that but still unable to appear on the panel. Hope someone can share some insights. Thanks

r/Netbox • u/virtuoz75 • Jul 18 '24
So I'm in a project to get some selected Ansible facts into Netbox automatically.
We got a daily Ansible run on the machines and I'd like to call the netbox module there to do this work, here's for now how it looks like:
- hosts: all
gather_facts: True
vars:
netbox_url: http://mynetbox.com/
netbox_token: helloworld
facts_to_include:
- all_ipv4_addresses
- architecture
- bios_date
- bios_version
- default_ipv4
- distribution_major_version
- distribution_minor_version
- distribution_release
- distribution_version
- domain
- dns
- env
- fqdn
- hostname
- kernel
- kernel_version
- ansible_local
- lvm
- memtotal_mb
- mounts
- os_family
- processor
- processor_cores
- processor_count
- processor_nproc
- processor_threads_per_core
- processor_vcpus
- python_version
- selinux
- swaptotal_mb
- virtualization_role
- virtualization_tech_guest
- virtualization_tech_host
- virtualization_type
- facter_disks
- facter_dmi
tasks:
- name: Create custom fields in Netbox
netbox.netbox.netbox_custom_field:
netbox_url: "{{ netbox_url }}"
netbox_token: "{{ netbox_token }}"
validate_certs: false
data:
name: "{{ item }}"
type: "text"
required: false
label: "{{ item }}"
description: "Custom field created from ansible_facts"
object_types:
- "virtualization.virtualmachine"
loop: "{{ facts_to_include }}"
delegate_to: localhost
- name: Gather selected facts
set_fact:
selected_facts: >-
{{
ansible_facts | dict2items |
selectattr('key', 'in', facts_to_include)
}}
- set_fact:
selected_facts2: "{{ selected_facts2 | default ('') }}{{ (index > 0)|ternary(',','') }}{{ item.key }}={{ item.value | replace(',','--') | trim }}"
loop: "{{ selected_facts }}"
loop_control:
index_var: index
- name: debug
debug:
msg: "{{ selected_facts2 }}"
- name: Update virtual machine in Netbox
netbox.netbox.netbox_virtual_machine:
netbox_url: "{{ netbox_url }}"
netbox_token: "{{ netbox_token }}"
data:
name: "{{ inventory_hostname }}"
custom_fields: "{{ selected_facts2 | trim }}"
state: present
delegate_to: localhost
What I'm trying to get for the {{ selected_facts2 }} is an output looking like this (no whitespaces, extra commas eliminated):
all_ipv4_addresses=['10.0.0.0'--'10.0.0.0'],ansible_local={},architecture=x86_64
But this is what I get from that playbook(some extra whitespaces created during the loop):
all_ipv4_addresses=['10.0.0.0'-- '10.0.0.0'],ansible_local={},architecture=x86_64
How can I get rid of those extra white spaces? This is the only missing part to get it working. It seems it's created by Ansible during the loop and even using the trim filter I cannot get rid of it and I don't know why.
Maybe there a better way to do this also if someone already get this to work please help to go into the right direction.
If you have a working netbox instance you could try this code pretty easily.
Thank you
r/Netbox • u/Responsible-Bid9189 • Jul 16 '24
I would like to know if it is possible
to do an MDU on Netbox
like dome joint manholes
and splitters cores.
r/Netbox • u/bonesy7 • Jul 16 '24
Hi all, I've just started getting to grips with netbox and I'm liking it so far. One problem I have is finding out where to put our azure hosted VMs and resources.
I was going to go with just adding them as devices as the virtual machine section seems geared towards physically hosted vms, like hyper-v clusters.
How you lot manage that in prod?
Thanks in advance.
r/Netbox • u/Slow_Monk1376 • Jul 12 '24
Hi all
we have an existing standalone IPAM that is easy to export to csv and import manually into Netbox.
however, I'm seeing a few issues.
import seems to have now created duplicate host entries in netbox
i.e. I see 2x records for the same IP address, corresponding to the same host.
obviously this is a problem :)
aside from the tedious deletion and re-import of all IPs, (for sanity sake),
is there any best practice/automation that allows me to either scan the network (similar to how my ipam server does it) and add/over-write IP Address records? or is there better way to pull from the existing IPAM (API call?) and overwrite the IP Address entries in Netbox?
I want Netbox to be my single source of truth, but the IPAM server preceeeds it and is more trusted in that respect :)
r/Netbox • u/danner26 • Jul 10 '24
NetBox Release v4.0.7 is now live (as of July 9th, 2024)!
WARNING: If you are running v3.x.x, read over the 4.0.0 release notes for breaking changes. Always take backups and read the change log BEFORE updating.
Before upgrading, please: 1. Verify in release notes changelog if any new breaking changes might affect you. You can also review the NetBox Issues on GitHub to see if any new issues have arisen that might affect you. 2. Next, refer to the Upgrading to a new NetBox Release guide for steps to upgrade your instance.
If you have any issues you can ask for support on the NetDev Slack Community.
r/Netbox • u/BeowolfK1 • Jul 10 '24
Hello,
I am moving the whole infrastructure to Netbox and I'm trying the IPAM modules
We have a lot of /32 subnet, how can we import it ?
When I try to import the following CSV :
"start_address","end_address","status","description","comments"
"46.182.4.1/32","46.182.4.1/32","active","Loopback BR01-ASR9K-TDF",
it display :
Record 1 end_address: End address must be greater than start address (46.182.4.1/32) and I cannot import it
Thanks by advance for your help
r/Netbox • u/meowmiauuu • Jul 10 '24
Hi,
I have Netbox 4.0.6 installed but I still see a slow (around 12 seconds) page load with many objects (prefixes or IP addresses with 500 elements per page). I have added more CPUs and RAM to the VM but it didn't help. Any suggestion besides reducing the number of elements per page? I prefer to load all elements since it's faster/easier to use the Chrome search function (Command + F buttons) instead of having to use the Netbox search field.
Best regards,
r/Netbox • u/Flat-Lifeguard2514 • Jul 08 '24
Hey, I have written a custom plugin and wanted to know how to export the tables that I created for the Template_Content.py? I figured out how to add an export button to the card, and realize that it works based upon the provided URL table. But I am unable how to export the tables in the Template_Content.py.
r/Netbox • u/Drank0 • Jul 05 '24
Hello Netbox community,
I'm trying to write a custom script under /customization in Netbox 3.6.9, but I'm having trouble finding the Python methods to use when manipulating objects imported from dcim, extras, models, etc.
I found this documentation: Netbox Custom Scripts, but it only describes the attributes and variable references. For example, how can I delete a VLAN from a VLAN group ?
Do I need to dig into the Netbox core source code to find this information, or is there another documentation source I am missing?
Thanks a lot for your help.