vRealize Network Insight Bulk Import of Data Sources
I’ve been rolling out quite a few vRealize Network Insight deployments (labs, Proof-of-Concepts) and while the installation of Network Insight is a cake walk (see automated installer here), add the data sources can be time consuming if you have a bunch of switches and/or other data sources which need to be imported.
One of those calls was /api/management/dataSource/setDataSource which was called when I added a data source. This call basically contained all the information needed to add a data source to the system. A quick reproduction showed that I could use the same API call to add a data source via the API!
After a bit of testing, reverse engineering of the API calls and try to break it, I came up with a PowerShell script that uses a CSV as input to add a set of data sources. It’s a raw script which needs a bit of work, but it already has saved me a bunch of manual and repetitive work.
Considering I’ve had several questions about bulk importing data sources into vRealize Network Insight and I’ve successfully been using the script on my latest Network Insight endeavors, I decided to put it online on my GitHub repository:
Instructions can be found in the README of that directory, which should be enough to get you going. Here’s an example of how it will look after putting together the CSV and running the import:
If this is something useful for you and you have ideas on how to improve it, please provide me with feedback (PRs are accepted, of course! ;-) ).
Other articles in the series vRealize Network Insight:
- You want micro-segmentation? vRealize Network Insight is your friend!
- Monitoring Firewall Rules with vRealize Network Insight
- vRealize Network Insight Bulk Import of Data Sources
- Installing vRealize Network Insight with PowerCLI
- Installing vRealize Network Insight with PowerCLI by Martijn Smit
- Integrating VMware NSX with VMware vRealize Log Insight by Martijn Smit
- Removing VMware Data Security after vShield to NSX upgrade by Martijn Smit
- PowerShell Friday: Using the Cisco ACI API by Martijn Smit
- Monitoring Firewall Rules with vRealize Network Insight by Martijn Smit