Has anyone integrated NetBox with ServiceNow as a method to help populate your CMDB

Donald Small1
Tera Expert

Hello,

 

Our network team uses an open source application called NetBox to help document the network infrastructure.  We are looking at possibly integrating this with ServiceNow to help populate our CMDB.  I was curious if anyone has been successful in doing so and if so, could you share some insights as to how it is working for you.

 

This is the first time I have come to the Community and typed a word in the search and got ZERO results, so I'm thinking that this may not be that common of an application for people.

 

Thanks in advance,

Donald

13 REPLIES 13

Jackson4
Tera Contributor

There are a 2 methods that I know of that can be used to accomplish this.  The first is writing a Custom Script in Netbox that loops through all devices and makes a REST API call into ServiceNow to build the device in the CMDB.  The REST Explorer in ServiceNow will provide you the information about what data is required and how to format the API call and payload.

The second is by utilizing Ansible and the netbox.netbox collection and the servicenow.itsm collection.  This is the method I'm currently using.  We utilize Netbox as our Source of Truth by leveraging the netbox.netbox.nb_inventory module.  With this I can filter out unwanted devices like Patch Panels, 3rd Party Vendor devices that we don't manage, etc.  Then it's just a simple Ansible playbook that creates each device in ServiceNow utilizing the servicenow.itsm.configuration_item module.

I guess a third way would be to export the devices from Netbox as a CSV and then import the CSV into Netbox.  But you may find that you either need to create a custom export template, custom report or manually sift through all the devices and remove unwanted ones before importing.

rrataj
Kilo Expert

so as Jackson proposed you can use a Custom Script in NetBox and PUSH the IP's / objects to ServiceNow using ServiceNow Table API 

https://netbox.readthedocs.io/en/stable/customization/custom-scripts/

https://developer.servicenow.com/dev.do#!/reference/api/orlando/rest/c_TableAPI

 

or you can PULL the NetBox data from ServiceNow end via existing NetBox REST API  

https://netbox.readthedocs.io/en/stable/rest-api/overview/ 

https://netbox.readthedocs.io/en/stable/rest-api/overview/#retrieving-multiple-objects

https://netbox.readthedocs.io/en/stable/rest-api/overview/#retrieving-a-single-object

 

Can you tell me how can we call the bearer token through REST in Servicenow? I am also in same BOAT now 🙂

This is easily supported with Credentials and Aliases in Flow Designer.  Any of these sort of integrations should really go through Integration Hub ETL these days.