Code Monkey home page Code Monkey logo

powershell-nsxt-tier1-bandwidth-vrni's Introduction

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.)

powershell-nsxt-tier1-bandwidth-vrni's People

Contributors

cloudmaniac avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.