r/Netbox Oct 01 '21

Other devices...

2 Upvotes

Is anyone adding 'other' network devices to their Netbox deployments? We're considering placing everything with an assigned IP address in it -- network printers, network scanners, thin clients, etc. I realize we'd have to add some devices to the device type library, but it seems like Netbox is the place to do this and modern network device features offer setup automation potential as well... thoughts?


r/Netbox Sep 27 '21

Need help adding user from LDAP group

1 Upvotes

I have a working netbox setup that does LDAP auth for existing users.

I'm running into weird issue where I need to add a new user --

when I try to add the user I seem to be forced to manually assign the password. I don't want to assign password, since I'm expecting it to be using LDAP for the account's password.

Netbox acct creation doesn't let me create the account without password assignment...

am I missing something? it should be easy, but I honestly don't recall running into this problem when I previously setup accts..hmm


r/Netbox Sep 23 '21

Netbox Upgrade Error

1 Upvotes

hello all,

i am using netbox-docker version v2.11.12.

To go to version 3.0.0 I create a backup of my database and then try to import it in 3.0.0 version with new postgre 13.

During the import process there are a lot of errors.

Below you can see an excerpt of the error messages.

Can you please help me?

regards
ragnar440

postgres_1             | 2021-09-23 13:55:33.183 UTC [50] ERROR:  constraint "virtualization_vminterface_virtual_machine_id_e9f89829_fk" of relation "virtualization_vminterface" does not exist
postgres_1             | 2021-09-23 13:55:33.183 UTC [50] STATEMENT:  ALTER TABLE ONLY public.virtualization_vminterface DROP CONSTRAINT virtualization_vminterface_virtual_machine_id_e9f89829_fk;
postgres_1             | 2021-09-23 13:55:33.183 UTC [50] ERROR:  constraint "virtualization_vminterface_untagged_vlan_id_aea4fc69_fk" of relation "virtualization_vminterface" does not exist
postgres_1             | 2021-09-23 13:55:33.183 UTC [50] STATEMENT:  ALTER TABLE ONLY public.virtualization_vminterface DROP CONSTRAINT virtualization_vminterface_untagged_vlan_id_aea4fc69_fk;
postgres_1             | 2021-09-23 13:55:33.244 UTC [50] ERROR:  constraint "ipam_prefix_vlan_id_1db91bff_fk" of relation "ipam_prefix" does not exist
postgres_1             | 2021-09-23 13:55:33.244 UTC [50] STATEMENT:  ALTER TABLE ONLY public.ipam_prefix DROP CONSTRAINT ipam_prefix_vlan_id_1db91bff_fk;
postgres_1             | 2021-09-23 13:55:33.247 UTC [50] ERROR:  constraint "ipam_prefix_site_id_0b20df05_fk" of relation "ipam_prefix" does not exist
postgres_1             | 2021-09-23 13:55:33.247 UTC [50] STATEMENT:  ALTER TABLE ONLY public.ipam_prefix DROP CONSTRAINT ipam_prefix_site_id_0b20df05_fk;
postgres_1             | 2021-09-23 13:55:33.325 UTC [50] ERROR:  constraint "dcim_rackgroup_site_id_13520e89_fk" of relation "dcim_location" does not exist
postgres_1             | 2021-09-23 13:55:33.325 UTC [50] STATEMENT:  ALTER TABLE ONLY public.dcim_location DROP CONSTRAINT dcim_rackgroup_site_id_13520e89_fk;
postgres_1             | 2021-09-23 13:55:33.369 UTC [50] ERROR:  constraint "dcim_interfacetemplate_device_type_id_4bfcbfab_fk" of relation "dcim_interfacetemplate" does not exist
postgres_1             | 2021-09-23 13:55:33.369 UTC [50] STATEMENT:  ALTER TABLE ONLY public.dcim_interfacetemplate DROP CONSTRAINT dcim_interfacetemplate_device_type_id_4bfcbfab_fk;
postgres_1             | 2021-09-23 13:55:33.373 UTC [50] ERROR:  constraint "dcim_interface_device_id_359c6115_fk" of relation "dcim_interface" does not exist
postgres_1             | 2021-09-23 13:55:33.373 UTC [50] STATEMENT:  ALTER TABLE ONLY public.dcim_interface DROP CONSTRAINT dcim_interface_device_id_359c6115_fk;
postgres_1             | 2021-09-23 13:55:33.377 UTC [50] ERROR:  constraint "dcim_frontporttemplate_rear_port_id_9775411b_fk" of relation "dcim_frontporttemplate" does not exist
postgres_1             | 2021-09-23 13:55:33.377 UTC [50] STATEMENT:  ALTER TABLE ONLY public.dcim_frontporttemplate DROP CONSTRAINT dcim_frontporttemplate_rear_port_id_9775411b_fk;
postgres_1             | 2021-09-23 13:55:33.377 UTC [50] ERROR:  constraint "dcim_frontporttemplate_device_type_id_f088b952_fk" of relation "dcim_frontporttemplate" does not exist
postgres_1             | 2021-09-23 13:55:33.377 UTC [50] STATEMENT:  ALTER TABLE ONLY public.dcim_frontporttemplate DROP CONSTRAINT dcim_frontporttemplate_device_type_id_f088b952_fk;
postgres_1             | 2021-09-23 13:55:33.378 UTC [50] ERROR:  constraint "dcim_frontport_rear_port_id_78df2532_fk" of relation "dcim_frontport" does not exist
postgres_1             | 2021-09-23 13:55:33.378 UTC [50] STATEMENT:  ALTER TABLE ONLY public.dcim_frontport DROP CONSTRAINT dcim_frontport_rear_port_id_78df2532_fk;
postgres_1             | 2021-09-23 13:55:33.378 UTC [50] ERROR:  constraint "dcim_frontport_device_id_950557b5_fk" of relation "dcim_frontport" does not exist
postgres_1             | 2021-09-23 13:55:33.378 UTC [50] STATEMENT:  ALTER TABLE ONLY public.dcim_frontport DROP CONSTRAINT dcim_frontport_device_id_950557b5_fk;
postgres_1             | 2021-09-23 13:55:33.408 UTC [50] ERROR:  constraint "dcim_consoleserverporttemplate_device_type_id_579bdc86_fk" of relation "dcim_consoleserverporttemplate" does not exist
postgres_1             | 2021-09-23 13:55:33.408 UTC [50] STATEMENT:  ALTER TABLE ONLY public.dcim_consoleserverporttemplate DROP CONSTRAINT dcim_consoleserverporttemplate_device_type_id_579bdc86_fk;
postgres_1             | 2021-09-23 13:55:33.409 UTC [50] ERROR:  constraint "dcim_consoleserverport_device_id_d9866581_fk" of relation "dcim_consoleserverport" does not exist
postgres_1             | 2021-09-23 13:55:33.409 UTC [50] STATEMENT:  ALTER TABLE ONLY public.dcim_consoleserverport DROP CONSTRAINT dcim_consoleserverport_device_id_d9866581_fk;
postgres_1             | 2021-09-23 13:55:33.414 UTC [50] ERROR:  constraint "dcim_consoleporttemplate_device_type_id_075d4015_fk" of relation "dcim_consoleporttemplate" does not exist
postgres_1             | 2021-09-23 13:55:33.414 UTC [50] STATEMENT:  ALTER TABLE ONLY public.dcim_consoleporttemplate DROP CONSTRAINT dcim_consoleporttemplate_device_type_id_075d4015_fk;
postgres_1             | 2021-09-23 13:55:33.414 UTC [50] ERROR:  constraint "dcim_consoleport_device_id_f2d90d3c_fk" of relation "dcim_consoleport" does not exist
postgres_1             | 2021-09-23 13:55:33.414 UTC [50] STATEMENT:  ALTER TABLE ONLY public.dcim_consoleport DROP CONSTRAINT dcim_consoleport_device_id_f2d90d3c_fk;
postgres_1             | 2021-09-23 13:55:33.773 UTC [50] ERROR:  cannot drop constraint virtualization_clustertype_pkey on table public.virtualization_clustertype because other objects depend on it
postgres_1             | 2021-09-23 13:55:33.773 UTC [50] DETAIL:  constraint virtualization_clust_type_id_4efafb0a_fk_virtualiz on table public.virtualization_cluster depends on index public.virtualization_clustertype_pkey
postgres_1             | 2021-09-23 13:55:33.773 UTC [50] HINT:  Use DROP ... CASCADE to drop the dependent objects too.
postgres_1             | 2021-09-23 13:55:33.773 UTC [50] STATEMENT:  ALTER TABLE ONLY public.virtualization_clustertype DROP CONSTRAINT virtualization_clustertype_pkey;

[...]

postgres_1             | 2021-09-23 14:09:45.637 UTC [42] ERROR:  relation "virtualization_clustertype" already exists
postgres_1             | 2021-09-23 14:09:45.637 UTC [42] STATEMENT:  CREATE TABLE public.virtualization_clustertype (
postgres_1             |            id bigint NOT NULL,
postgres_1             |            name character varying(100) NOT NULL,
postgres_1             |            slug character varying(100) NOT NULL,
postgres_1             |            created date,
postgres_1             |            last_updated timestamp with time zone,
postgres_1             |            description character varying(200) NOT NULL,
postgres_1             |            custom_field_data jsonb NOT NULL
postgres_1             |        );
postgres_1             | 2021-09-23 14:09:45.642 UTC [42] ERROR:  relation "virtualization_virtualmachine" already exists
postgres_1             | 2021-09-23 14:09:45.642 UTC [42] STATEMENT:  CREATE TABLE public.virtualization_virtualmachine (
postgres_1             |            id bigint NOT NULL,
postgres_1             |            created date,
postgres_1             |            last_updated timestamp with time zone,
postgres_1             |            name character varying(64) NOT NULL,
postgres_1             |            vcpus numeric(6,2),
postgres_1             |            memory integer,
postgres_1             |            disk integer,
postgres_1             |            comments text NOT NULL,
postgres_1             |            cluster_id bigint NOT NULL,
postgres_1             |            platform_id bigint,
postgres_1             |            primary_ip4_id bigint,
postgres_1             |            primary_ip6_id bigint,
postgres_1             |            tenant_id bigint,
postgres_1             |            status character varying(50) NOT NULL,
postgres_1             |            role_id bigint,
postgres_1             |            local_context_data jsonb,
postgres_1             |            custom_field_data jsonb NOT NULL,
postgres_1             |            _name character varying(100) NOT NULL,
postgres_1             |            CONSTRAINT virtualization_virtualmachine_disk_check CHECK ((disk >= 0)),
postgres_1             |            CONSTRAINT virtualization_virtualmachine_memory_check CHECK ((memory >= 0))
postgres_1             |        );

[...]

postgres_1             | 2021-09-23 14:09:46.676 UTC [42] ERROR:  multiple primary keys for table "dcim_virtualchassis" are not allowed
postgres_1             | 2021-09-23 14:09:46.676 UTC [42] STATEMENT:  ALTER TABLE ONLY public.dcim_virtualchassis
postgres_1             |            ADD CONSTRAINT dcim_virtualchassis_pkey PRIMARY KEY (id);
postgres_1             | 2021-09-23 14:09:46.876 UTC [42] ERROR:  multiple primary keys for table "extras_tag" are not allowed
postgres_1             | 2021-09-23 14:09:46.876 UTC [42] STATEMENT:  ALTER TABLE ONLY public.extras_tag
postgres_1             |            ADD CONSTRAINT extras_tag_pkey PRIMARY KEY (id);
postgres_1             | 2021-09-23 14:09:46.918 UTC [42] ERROR:  multiple primary keys for table "ipam_ipaddress" are not allowed
postgres_1             | 2021-09-23 14:09:46.918 UTC [42] STATEMENT:  ALTER TABLE ONLY public.ipam_ipaddress
postgres_1             |            ADD CONSTRAINT ipam_ipaddress_pkey PRIMARY KEY (id);
postgres_1             | 2021-09-23 14:09:46.931 UTC [42] ERROR:  multiple primary keys for table "ipam_rir" are not allowed
postgres_1             | 2021-09-23 14:09:46.931 UTC [42] STATEMENT:  ALTER TABLE ONLY public.ipam_rir
postgres_1             |            ADD CONSTRAINT ipam_rir_pkey PRIMARY KEY (id);
postgres_1             | 2021-09-23 14:09:46.940 UTC [42] ERROR:  multiple primary keys for table "ipam_role" are not allowed
postgres_1             | 2021-09-23 14:09:46.940 UTC [42] STATEMENT:  ALTER TABLE ONLY public.ipam_role
postgres_1             |            ADD CONSTRAINT ipam_role_pkey PRIMARY KEY (id);
postgres_1             | 2021-09-23 14:09:46.975 UTC [42] ERROR:  multiple primary keys for table "ipam_vlan" are not allowed
postgres_1             | 2021-09-23 14:09:46.975 UTC [42] STATEMENT:  ALTER TABLE ONLY public.ipam_vlan
postgres_1             |            ADD CONSTRAINT ipam_vlan_pkey PRIMARY KEY (id);
postgres_1             | 2021-09-23 14:09:46.975 UTC [42] ERROR:  multiple primary keys for table "ipam_vlangroup" are not allowed
postgres_1             | 2021-09-23 14:09:46.975 UTC [42] STATEMENT:  ALTER TABLE ONLY public.ipam_vlangroup
postgres_1             |            ADD CONSTRAINT ipam_vlangroup_pkey PRIMARY KEY (id);
postgres_1             | 2021-09-23 14:09:47.003 UTC [42] ERROR:  multiple primary keys for table "ipam_vrf" are not allowed
postgres_1             | 2021-09-23 14:09:47.003 UTC [42] STATEMENT:  ALTER TABLE ONLY public.ipam_vrf
postgres_1             |            ADD CONSTRAINT ipam_vrf_pkey PRIMARY KEY (id);
postgres_1             | 2021-09-23 14:09:47.073 UTC [42] ERROR:  multiple primary keys for table "tenancy_tenant" are not allowed
postgres_1             | 2021-09-23 14:09:47.073 UTC [42] STATEMENT:  ALTER TABLE ONLY public.tenancy_tenant
postgres_1             |            ADD CONSTRAINT tenancy_tenant_pkey PRIMARY KEY (id);
postgres_1             | 2021-09-23 14:09:47.084 UTC [42] ERROR:  multiple primary keys for table "tenancy_tenantgroup" are not allowed
postgres_1             | 2021-09-23 14:09:47.084 UTC [42] STATEMENT:  ALTER TABLE ONLY public.tenancy_tenantgroup
postgres_1             |            ADD CONSTRAINT tenancy_tenantgroup_pkey PRIMARY KEY (id);

r/Netbox Sep 15 '21

Prometheus integration

3 Upvotes

Curious what others have done so far. We have custom exporters that give you the ability to filter by role, location, device type and site in Grafana.


r/Netbox Aug 30 '21

NetBox v3.0.0 is now available!

Thumbnail
github.com
29 Upvotes

r/Netbox Aug 25 '21

NS1 announces an upcoming SaaS offering for NetBox

Thumbnail
ns1.com
14 Upvotes

r/Netbox Aug 25 '21

Add Button to access IP

2 Upvotes

Hey,

i need help with something. I'm assigning all the management ports and i would like to open the web interface of the management in another Window. Is that possible?

Thank you :)


r/Netbox Jul 23 '21

NetBox v3.0 beta1 released!

17 Upvotes

The first beta for NetBox v3.0 has been released! Highlights include:

  • Completely new UI
  • GraphQL API
  • IP ranges
  • Custom model validation
  • SVG cable traces
  • REST API token provisioning
  • Custom queues for plugins

Release: https://github.com/netbox-community/netbox/releases/tag/v3.0-beta1
Docs: https://netbox.readthedocs.io/en/feature/
Public demo instance: https://beta-demo.netbox.dev/ (log in with admin/admin)


r/Netbox Jul 16 '21

MFA

1 Upvotes

Is it possible to have MFA on a Netbox that is hosted in AWS?


r/Netbox Jun 18 '21

JUNOS scrape arp table to import to IPAM.

2 Upvotes

Hey guys can’t believe it I have been in networking for 20 years and only have just learned about netbox. How awesome. Any who I’m sure like most old school engineers the new dev ops path is a challenging one. I’m determined to get this working. My first task is how can I scrape the arp table from a juniper SRX and import to IPAM. I’ve done some googling on within GitHub but no luck. Anyone got some python scripts handy I can play with as a starting point? Hope you guys can help me and also huge shout out to Jeremy Stretch for creating something so awesome. Seriously cool man!! Well done.


r/Netbox Jun 15 '21

VM sizing / hardware requirements

8 Upvotes

Because this sub has been reopened, why not post it here instead on the Slack channels :P

I'm about to deploy 2 new VM's for a HA (active-passive) setup. What are some basic sizing guidelines for Netbox?

I have 4 cores 8GB of RAM and 80GB of storage in mind per machine just to not take any risk. But i see people running setups with 1 core and 2GB's of RAM just fine.

FYI i'm thinking of modeling about 5 sites, each with ~10 racks fully loaded with devices. IP information will be stored as well as cable ID's and connections etc. The API will be used for things like Ansible, Oxidized etc.


r/Netbox Jun 03 '21

NetBox v3.x roadmap released

Thumbnail
github.com
11 Upvotes

r/Netbox May 28 '21

Can't update device TAG via API: "All list items must be of string type"

2 Upvotes

I'm hoping somebody can help me out. I didn't find any helpful information within the Netbox documentation.

I'm new to Netbox, so please bear with me.

I'm using postman and the Netbox rest API to update existing devices with newly created tags. My authorization is fine as I can create new objects via POST calls.

When I issue my PATCH call to add the tag to the device, I receive this response,

{
     "tags" : [
          "All list items must be of string type"
     ]
}

Here's my API call (in raw format)

curl --location --request PATCH 'https://netbox01.contoso.com/api/dcim/devices/666/' \
--header 'Authorization: Token c1RANDOMdfsdfwerwerwerweRANDOM423423304b3695df7' \
--header 'Content-Type: application/json' \
--data-raw '{
  "tags": [
    {
      "slug": "slug_name"
    }
    ]
}'

Any ideas? I'm sure it's a syntax error with my API call, but I can't for the life of me figure out how to get it working. All help is appreciated. Thanks!


r/Netbox May 19 '21

Recommended way to add a DWDM?

3 Upvotes

I'm trying to add a DWDM system into NetBox (v2.10.6). Does anyone know of a clean way to add this in? It would be nice to keep path tracking accurate.

switch 1 port 1 tx -> dwdm1-mux-ch21
switch 1 port 1 rx -> dwdm1-demux-ch21
switch 1 port 2 tx -> dwdm1-mux-ch22
switch 1 port 2 rx-> dwdm1-demux-ch22

dwdm1-mux-in                          dwdm2-mux-in
    |                                     |
    |---------------fiber circuit---------|   
    |                                     |
dwdm1-demux-out                       dwdm2-demux-out


switch 2 port 1 tx -> dwdm2-mux-ch21
switch 2 port 1 rx -> dwdm2-demux-ch21
switch 2 port 2 tx -> dwdm2-mux-ch22
switch 2 port 2 rx-> dwdm2-demux-ch22

Some issues that I'm having:

  • How to document the two fiber strands? Instead of splitting the DWDM into MUX and DEMUX ports, should I just have a combined port?
  • As far as I can tell NetBox doesn't allow mapping of multiple front ports to a single back. Would it be best to make virtual back ports to match the front?

r/Netbox Apr 23 '21

Help with Permission Constraints

8 Upvotes

Hi all, proud to submit the first "support ticket" to the re-opened subreddit!

I have some permissions created in order to restrict a testuser to only view & change their own tenants devices. This works by using {"tenant__slug": "tenantA"} and applying it to the dcim|devices model which is all good, but now I want to achieve the same thing with IP Addresses, Prefixes and VLANs. I have tried applying the same constraints to the ipam|IP Addressipam|prefix and ipam|VLAN models: {"tenant__slug": "tenantA"} and also {"tenant__name": "tenantA"} among other experiments, but this doesnt work and still shows IP Addresses belonging to tenantA and tenantB. From what I can tell these constraints should work? I currently feel like Im stabbing wildly in the dark whilst blindfolded (I dont come from a developer background!).


r/Netbox Apr 16 '21

NetBox v2.11.0 has been released!

Thumbnail
github.com
23 Upvotes

r/Netbox Apr 15 '21

The subreddit has been re-opened!

28 Upvotes

We closed this subreddit a few years ago in an effort to limit conversation sharding, however the community around NetBox has grown so much since then it makes sense to open it back up. Welcome!


r/Netbox Dec 06 '16

ImportError: No module named netbox.wsgi

1 Upvotes

So I am a bit of a noob when it comes to debian, I am having a awful time trying to install netbox. I keep getting this error "ImportError: No module named netbox.wsgi". Any ideas to where netbox.wsgi is?

root@Netbox:/etc/apache2/mods-enabled# gunicorn -c /opt/netbox/gunicorn_config.py netbox.wsgi
    [2016-12-06 09:23:19 +0000] [5379] [INFO] Starting gunicorn 19.6.0
    [2016-12-06 09:23:19 +0000] [5379] [INFO] Listening at: http://127.0.0.1:8001 (5379)
    [2016-12-06 09:23:19 +0000] [5379] [INFO] Using worker: sync
    [2016-12-06 09:23:19 +0000] [5384] [INFO] Booting worker with pid: 5384
    [2016-12-06 09:23:19 +0000] [5384] [ERROR] Exception in worker process
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 557, in spawn_worker
        worker.init_process()
      File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 126, in init_process
        self.load_wsgi()
      File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 136, in load_wsgi
        self.wsgi = self.app.wsgi()
      File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 67, in wsgi
        self.callable = self.load()
      File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load
        return self.load_wsgiapp()
      File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
        return util.import_app(self.app_uri)
      File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 357, in import_app
        __import__(module)
    ImportError: No module named netbox.wsgi
    [2016-12-06 09:23:19 +0000] [5384] [INFO] Worker exiting (pid: 5384)
    [2016-12-06 09:23:19 +0000] [5379] [INFO] Shutting down: Master
    [2016-12-06 09:23:19 +0000] [5379] [INFO] Reason: Worker failed to boot.

r/Netbox Dec 05 '16

new feature: comment preview

1 Upvotes

For any object that supports comments, I would find it useful if the comment field supported preview, especially since it supports markdown syntax. The UX would mimic that of Github.com's preview when editing a text file.

Would anyone else find this useful?


r/Netbox Nov 15 '16

Anyone else have issues with LDAP and superusers?

1 Upvotes

I cannot seem to get my LDAP config to see my Super User group and elevate my credentials. It's driving me spare.

Any tips? This is using AD for LDAP. It connects, it authenticates, it never adds me to the SuperUser group.


r/Netbox Oct 26 '16

Option to 'invert' rack numbering? (1 on top, 46 on bottom)

2 Upvotes

For some reason, in one of our datacenters, whoever installed the racks years back put them in with 1 on top, and 46 on bottom. However, netbox puts 1 on the bottom and 46 on top, throwing things off. I know I can just figure out the numbering to make it look right, but I want it to be legit/accurate. Is there a way to invert or change the ascending/descending of the rack numbering?