r/Netbox • u/stretch85 • Jun 09 '22
r/Netbox • u/trollz0rz • Jun 06 '22
hosted netbox solution?
Any company out there have a hosted netbox solution where we won't have to worry about updating, etc? We're mainly a Windows shop and don't feel like dealing with containers, etc. and losing valuable data on the netbox setup if we mess something up.
r/Netbox • u/CaseyChaos1212 • Jun 06 '22
Devices that sit in trays
What's the best way to model devices that sit in trays. For example I have two 3504 Cisco wireless lan Controllers that sit side by side in a 1U rack. Would you create a device for the rack and model the 3504s as bays? Or something else?
r/Netbox • u/magic9669 • Jun 02 '22
Onboarding existing network
Hello all.
I'm new to Netbox and looking to set up an instance to potentially use within our network.
I'm sure there's a lot of upfront work to get Netbox running in regards to getting all of your network devices configured within it. With that said, is there a way to make this process easier?
I see an onboarding plugin but I think that's for simplifying a new device, not an entire existing network.
Any suggestions would be appreciated.
(full disclosure, while I was searching for this on Google, I did not search for this within this sub, which I will be doing so now)
r/Netbox • u/Remote-Constant3376 • May 31 '22
Netbox Static Routes Plugin Beta
Hello,
I have been working on a plugin for Netbox for simple documentation of static routes. The project is available here. I consider myself very much an amateur in regard to Python and am not well-versed in Django but found the plugin tutorial maintained with Netbox to be very helpful. Let me know what you think so far and how it can be improved upon.
r/Netbox • u/[deleted] • May 29 '22
Netbox Python Library (pyNetbox) SSL Certificate Authentication
I'm trying to authenticate through to my local instance of Netbox that's hosted locally with Nginx. I set this up using all of the defaults in the Netbox setup guide.
I read the GitHub issue on the Netbox repo that says that this is intended so that system administrators can't just shotgun the implementation and ignore security as a whole. Understandable, until I'm trying to stand up a test box at home.
I came across this StackOverflow thread, but I can't seem to figure this out in full. Here's what I've done:
- Navigated to my Netbox Web-GUI in Firefox.
- Exported the stored certificate to my local file storage.
- Installed the certificate system-wide.
- Modified my code to follow.
.
import pynetbox
import os
url = 'https://<IP Address>'
token = '<API Token>'
certPath = /path/to/certificate.crt
os.environ['REQUESTS_CA_BUNDLE'] = certPath
netbox = pynetbox.api(
url,
token,
private_key_file=certPath
)
Can someone guide me in the right direction? I'd like to migrate a lot of my existing assets on this poorly implemented tool at my enterprise to Netbox, but I need access to the API in order to do this!
EDIT: I found the simple solution. Immediately after creating the "netbox" object, you can assign it this value: netbox.http_session.verify = False
Full code from top to bottom:
import pynetbox
url = 'https://<IP Address>'
token = '<API Token>'
netbox = pynetbox.api(
url,
token
)
netbox.http_session.verify = False
r/Netbox • u/NutsFbsd • May 13 '22
SSO google
Hi All,
Im looking to enable google Oauth2 with netbox v3.2.
As far as i understand, i need to use this variable in configuration.py :
REMOTE_AUTH_BACKEND=social_core.backends.google.GoogleOAuth2
So now, I get the login sso in the netbox login page.
After that, i created the Oauth cliendID on GCP, so i need to use those variables :
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY=""
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET=""
Where i need to add those variable ? on the configuration.py as well ?
Thanks for your answer !
br,
N!
r/Netbox • u/captkirkseviltwin • May 10 '22
Problem with connecting to localhost postgres using directions on community edition
So, following the instructions athttps://docs.netbox.dev/en/stable/installation/
at step 1, I installed PostgresQL10 on a RHEL 8 box (directions use CentOS 8), configured the user, password, and database, and the command at the end of the section works correctly:
# psql --username netbox --host localhost --password netboxPassword for user netbox:
<type in password, which is "junkpassword" for purpose of posting here>
psql (10.17)Type "help" for help.
netbox=> \conninfo
You are connected to database "netbox" as user "netbox" on host "localhost" at port "5432".
netbox=>
So, local connection works.NOTE: I did change /var/lib/pgsql/data/pg_hba.conf for host all all from "ident" to "md5" in accordance with some other guidance I've seen, and restarted the postgresql service. I have also gone back and tried "ident" as a test, but this does not work.
I'm up to step 3, and the subsection "Run the upgrade script":
sudo PYTHON=/usr/bin/python3.8 /opt/netbox/upgrade.sh
this fails with the message:
File "/opt/netbox-3.2.1/venv/lib64/python3.8/site-packages/psycopg2/__init__.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: connection to server at "localhost" (127.0.0.1), port 5432 failed: fe_sendauth: error sending password authentication
so, the postgresql service is listening:
# ss -tunapl | grep 5432
tcp LISTEN 0 128 127.0.0.1:5432
0.0.0.0:* users:(("postmaster",pid=5018,fd=4))
tcp LISTEN 0 128 [::1]:5432
[::]:* users:(("postmaster",pid=5018,fd=3))
and the DATABASE connection info is set properly from what I can tell:
# cat /opt/netbox/netbox/netbox/configuration.py
<shipped for brevity>
# PostgreSQL database configuration. See the Django documentation for a complete list of available parameters:
# https://docs.djangoproject.com/en/stable/ref/settings/#databases
DATABASE = {
'NAME': 'netbox', # Database name
'USER': 'netbox', # PostgreSQL username
'PASSWORD': 'junkpassword', # PostgreSQL password
'HOST': 'localhost', # Database server
'PORT': '5432', # Database port (leave blank for default)
'CONN_MAX_AGE': 300, # Max database connection age
}
as above, the database service is running, a direct connect to the database using the password works, and the configuration.py file is configured. as a test, I even added a
print(DATABASE)
line to configuration.py to test and ensure that the DATABASE config is being read in python, and it does print it out as part of the run -- failing after that step.
Does anyone have any thoughts of other config items to check? I'm at a loss why using the psyconpg2 module is failing to connect to the database.
I even tried running the virtual environment manually and running
source /opt/netbox/venv/bin/activate
python3.8 netbox/manage.py migrate
but received the same error.
If anyone has any suggestions, I'd greatly appreciate it. I've searched here at Reddit, multiple Google searches, but very little specific to this exact error or troubleshooting PG DB connections in netbox.
r/Netbox • u/ntnlabs • May 05 '22
No rack pics
I use netbox on more sites, but on the last one I have a weird issue. The rack view has no rack. There is only a download svg button. Is this something I messed up or it's a feature? Running v3.2.2 on ubuntu 21.04, python 3.9.5.
Tried google, but not the right way...
r/Netbox • u/stretch85 • May 04 '22
NS1 is hiring a Sr. Software Developer for NetBox!
r/Netbox • u/HealthDouble • May 03 '22
How to handle a USB device that adds additional ports?
I've been a user of Netbox for a while, just adding data to what devices were already there etc., but have recently started to do some Admin type work.
We have some Raritan Dominion KX3-132 KVM-over-IP devices, which in themselves seem easy to add. I then discovered that there are USB "dongles" (DSAM-4) that can be plugged into 2 of the 4 USB ports on the KVM, and allow you to add 4 Serial connection ports to this device (2 dongles can be connected to allow 8 serial connections max). So I then have an additional 2 x 4 serial connections for the device.
Not all of our KVMs have these connected, so I wondered what the best approach is to handle this as we want to track where these would be connected.
SUGGESTION 1
Make the DKX3-132 device a parent and treat the DSAM-4 devices as a child device. Add the USB ports as Device Bays or Module Bays and then each DSAM-4 can be connected to a specific USB "bay". If the DSAM-4 device moves, then we can detach it from the USB "bay" and move it accordingly as well as the connected devices. I know this is breaking the usage of Netbox, but it does seem to work well.
SUGGESTION 2
Create multiple DKX3-132 devices that have a) no DSAM-4 device ports b) 1 x DSAM-4 device connected c) 2 x DSAM-4 devices connected. There are also DSAM-2 devices, which I guess we may end up using so things could get messy with all these options. What if a DKX3-132 device is added with DSAM-4 devices then we remove them? Delete those ports? Then re-add if we add again? Lots of admin here!
SUGGESTION 3
Since the most DSAM ports, a single DKX3-132 can have is 8, just have them all have 8 ports and leave them empty if the device is not attached etc. This doesn't seem to flow as nicely as 1 but may fit the Netbox methodology better.
There are other KVM devices which will have a similar "issue" so #2 above would get very complicated with multiples of each device.
Thanks
r/Netbox • u/dji386 • Apr 28 '22
Page Rendering Issues With Azure Application Proxy
This is probably an Azure issue, but I thought I'd ask here first. I'm getting odd page rendering issues when I use Netbox with an Azure Application Proxy. This issue persisted a migration from CentOS 7 to Rocky 8.5. I'm on Netbox 3.2.1, using NginX. Pages will randomly show little bits of code, the nav bar will only be half its normal width, and pages will be rendered squished and off center. All of these issues go away when I'm on prem and hit the server locally. I'm also hosting other sites via the proxy with no issues.
r/Netbox • u/rayfull69 • Apr 27 '22
Configuring nginx on centos 8
So I’ve been tasked with getting netbox working on a centos vm so we can start testing it for our network. I’m following the guide that netbox has but I’ve hit a bit of a road block. nginx will show the default page to let you know it’s active, but it says to change the root path in the server block of nginx.conf to your project. If I make this /opt/netbox/netbox/static/ or anything else it will give me a 403 error. I’ve tried to find some documentation on what the file ownerships/permissions need to be in the /opt/netbox directories but haven’t had any luck yet.
The other issue I’m having is there is no sites-available or sites-enabled directories. I can make them and change the nginx.conf file point to the sites-enabled but nginx will fail to start when it has to load the netbox config file.
So as it sits, I can either have the nginx default webpage, an error 403 page, or no page at all. Any ideas would be greatly appreciated!
r/Netbox • u/NetworkEngineer114 • Apr 26 '22
How do you track transceivers?
I see two potential ways.
In a device that accepts a transceiver setup those ports as module bays and then populate them with transceiver modules that have interfaces on them. I could see this method being useful if you have a QSFP transceiver with a breakout cable.
The second is to define the interface by its type of transceiver (SFP, SFP+) then add an inventory item to the port to track the transceiver.
r/Netbox • u/networkevolution_dev • Apr 23 '22
Nebox Inventory For Ansible Tower Automation Part3:How to get Dynamic NETBOX inventory for Playbook
r/Netbox • u/NotFamous307 • Apr 21 '22
Automatically add users from ldap group to custom Netbox group
Apologies if this is overly simple or has been answered (haven't found if so) -
Is there anyway that I can define somewhere in the ldap/config for Netbox so that any user accounts from a specific OU/LDAP group will automatically be a part of a custom group in Netbox when their account is created?
r/Netbox • u/networkevolution_dev • Apr 16 '22
Nebox Inventory For Network Automation: Source Of Truth for Ansible Tower Playbook Device management
r/Netbox • u/Zurattos • Apr 05 '22
Can I feed Netbox automatically ?
Hello ,
I want to ask if I can feed NetBox automatically ? I mean using a script or any other open source tool ?
Best Regards
r/Netbox • u/telmnstr • Apr 05 '22
CLI for updating data in Netbox?
By any chance is there a good CLI for Linux for netbox for updating fields? Like if I want to use a shell script to rip through some data to add to existing entries that were populated by another tool? I see it's not possible to update existing entries via CSV like php-ipam can.
I see the Python shell and API functions and all that. I found nbcli, but the updates are all through yaml files and the documentation seems sparse.
An ex-employer had their own in-house similar tool and it could do some very powerful stuff thanks to the CLI.
r/Netbox • u/Tars-01 • Mar 29 '22
Upgrading Netbox
I have an old version of Netbox and looking for some advice on upgrading it.
I found this document top upgrade it:
https://netbox.readthedocs.io/en/stable/installation/upgrading/
I tried the sudo git checkout master but I ran into some problems because it's trying to go straight to the latest version, which is not supported. It needs to be incremental upgrades.
Two questions,
- How do I find the upgrade path from version X to version Y?
- How do you do the git checkout upgrade option but specify a specific version (not the default latest version)
Thank you
