vRealize Network Insight

Automating vRealize Network Insight with PowerShell and Python

vRealize Network Insight is a treasure trove of information on what’s happening in your network. It ingests network configuration data, application flows going through the network, metrics, and correlates all this data to the application workloads. One of the best-kept secrets is that all this information is also available via the public APIs of Network Insight.

From exporting network flow data, recommended firewall rules, analytics data, to pushing data sources and applications, there’s a lot there.

Public API

Network Insights public API is one based on modern standards using an HTTP based, RESTful API. The documentation for this API is available directly from Network Insight and the built-in API Explorer gives you the ability to review the available APIs, expected format and expected results, and also allow you to test API calls directly from the same interface.

While using the raw API will be interesting for the developers amongst us, we’ve made it a bit more easy for infrastructure engineers and administrators to use the data available from Network Insight. There are a few wrappers, or SDKs, available that do just that. It’ll be easier to consume network data from Network Insight when you are using your favorite scripting language.

I’ll briefly describe the possibilities using PowerShell and Python below, and for an in-depth description and a real-time demo, watch the video below.


PowerShell is pretty popular within the VMware community. With PowerCLI, PowerNSX, PowervRA, and more being available – VMware products are being automated against to create consistency and allow data sharing between multiple systems. Being a big fan of PowerShell myself, I created PowervRNI a few years ago.

PowervRNI is a PowerShell module that has almost all public API calls implemented. It can be used to export any data, create applications, data sources, and more. Check out the Github page to get more information and examples.


While PowerShell can be used to create full scripts and do anything you need, the most common use it to do one-liners with it. Python typically comes around when you want to pull information from 1 source, process that information and push it another system or file. Doing multiple operations in sequence.

The Python SDK for vRealize Network Insight abstracts the public API and makes them available via Python classes and functions. This SDK is 100% complete as it is automatically generated from the Network Insight API documentation, whenever a new version is released.

Check out the Github page for the Python SDK to get more information and example scripts.


Now, let’s have a look at some examples in this video:



Leave a Reply

Your email address will not be published. Required fields are marked *