Export Network Flows from vRealize Network Insight

This vRealize Network Insight Python SDK example script saves all network flows that match the search query used in the code. Make sure to update the filter_string variable into a search that's valid for your environment. Currently, it'll export internet flows coming from the vCenter datacenter name HaaS-1, as an example. This script requires the vRNI Python SDK, which is available here: https://github.com/vmware/network-insight-sdk-python

The output will be a CSV file, with these columns: 'src_ip', 'dst_ip', 'src_vm', 'src_security_groups', 'port'

# python flows_exporter.py --help

usage: flows_exporter.py [-h] [--deployment_type DEPLOYMENT_TYPE]
                         [--platform_ip PLATFORM_IP] [--username USERNAME]
                         [--password PASSWORD] [--domain_type DOMAIN_TYPE]
                         [--domain_value DOMAIN_VALUE] [--get_vidm_client_id]
                         [--vidm_token VIDM_TOKEN] [--api_token API_TOKEN]

Run Public APIs on vRNI Platform

optional arguments:
  -h, --help            show this help message and exit
  --deployment_type DEPLOYMENT_TYPE
                        Setup deployment type: onprem or niaas
  --platform_ip PLATFORM_IP
                        IP address of vRNI platform. In case of cluster IP
                        address of Platform-1
  --username USERNAME   user name for authentication
  --password PASSWORD   password for authentication
  --domain_type DOMAIN_TYPE
                        domain type for authentication: LOCAL or LDAP or VIDM
  --domain_value DOMAIN_VALUE
                        domain value for LDAP user: example.com
  --get_vidm_client_id  Get client-id for making user access-token request to
  --vidm_token VIDM_TOKEN
                        Provide vidm_token
  --api_token API_TOKEN
                        Provide niaas api token

Sign in to be able to add comments.

Comments 0