Welcome, Guest. Please login or register.

Author Topic: Has anyone been able to or attempt integration with netbox?  (Read 242 times)

primethios

  • Newbie
  • *
  • Posts: 6
    • View Profile
Has anyone been able to or attempt integration with netbox?
« on: February 18, 2025, 05:12:12 am »
While trying to show a site NeDi, the new owners and leadership had someone decide they want netbox as the "source of truth".  Personally I hate setting up netbox and a fair chunk of what people are using it for I can do with NeDi but I can see a few ways NeDi could compliment netbox and maybe there are some uses I haven't thought of.  So I figured maybe someone on the forum may have been down this path either by choice or by force.  One thing I still struggle with after 10+ years of using NeDi is that I am not a programmer so I don't know how to customize, much less create API calls and such that I know many of you do.  I am a simple network guy and NeDi is my way to discover networks, hidden devices, etc and create inventory reports when manager types ask for random data like "how many of these" "are we running mismatched IOS" and such.  I am between contracts right now so I have the time to testbed and such if someone is able to point me in the right direction.  Plus it would be interesting to hear how you may be making use of such an integration.

sergrok

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Has anyone been able to or attempt integration with netbox?
« Reply #1 on: February 28, 2025, 02:31:09 pm »
Hi, primethios

 Our team has made such an integration between NeDi and netbox. It's a python script that stored and run inside netbox. This thing is very "hardcoded" for our environment and unfortunately I can't share it due to our policy :(  In our case netbox is the "source of truth" and nedi is additional source of factual information. The script checks differences between netbox and nedi and tells us if we have new devices that are not yet added to netbox or if we have mismatches in things like device name, vlans, interfaces IPs, etc.
The script gets the data from nedi via sql queries to nedi database e.g.:
sql_all_routers = "SELECT device,inet_ntoa(devip),type FROM public.devices WHERE snmpversion>0 AND lastdis>extract(epoch from (now() - INTERVAL '2 DAYS')) AND vendor='Cisco' AND services=78 AND type NOT LIKE 'WS-%'"
sql_all_switches = "SELECT device,inet_ntoa(devip),type FROM public.devices WHERE snmpversion>0 AND lastdis>extract(epoch from (now() - INTERVAL '2 DAYS')) AND vendor='Cisco' AND type LIKE 'WS-%'"