Skip to content

cloudmaniac/powershell-nsxt-tier1-bandwidth-vrni

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Get Ingress Egress Bandwidth Usage for an NSX-T Tier-1 Gateway

Description

This script use the PowervRNI PowerShell module to get ingress and egress bandwidth statistics for an NSX-T Tier-1 Gateway (on-premises, or VMConAWS). The output of the script can be useful to calculate egress traffic charges for public clouds (e.g.,in a VMware Cloud on AWS context) by Tier-1 Gateways.

Starting vRealize Network Insight (vRNI) 3.6, the platform has a public API. PowervRNI is a PowerShell module that takes advantage of those public APIs and provides you with the option to look at vRNI data using PowerShell.

Note: this script is provided as an example.

Usage

The following steps assumes that vRealize Network Insight (or vRealize Network Insight Cloud) is already deployed, configured, and collecting data from vCenter and relevant NSX-T Manager.

Install PowervRNI

The easiest way is to install PowervRNI is through the PowerShell Gallery where everything is taken care of for you.

PS C:\> Install-Module PowervRNI
PS C:\> Import-Module PowervRNI

Connection to vRNI

The API of vRNI requires you to login to the Platform VM first. Here's how:

PS C:\> Connect-vRNIServer -Server superdope.vrni.lab -Username admin@local -Password VMware1!

Give me the bandwidth

  • Adapt the list of NSX-T Edge Gateway ($Tier1Gateways_to_lookup, line 29) to your environment
  • Launch the script
  • Enjoy

Get the NSX-T Tier-1 Gateways Ingress and Egress Bandiwdth Statistics with PowervRNI

Considerations

The period is currently 24 hours.

Enhancements

  • Move the variable from static definition in the code to input
  • Provide time frame choice (by 24 hours, monthly, etc.)

About

PowerShell script to get ingress and egress bandwidth statistics for an NSX-T Tier-1 Gateway (on-premises, or VMConAWS).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published