Automated Site Capacity Reports for NetProfiler using SteelScript

Overview

Use SteelScript Python API to generate site capacity reports based on your NetProfiler byLocation Host Groups.  The script generates an summary file per site (in HTML format) based on an input file (specified by the --sitecap parameter (e.g. input.csv in attached zip file)).  The end result is a summary per site as follows.

 

Seattle

3.088 Mbps WAN Capacity

Traffic levels are acceptable for WAN capacity.


Utilization
Peak95th Percentile
Inbound (%)55.6051.29
Outbound (%)6.996.37

Seattle_linechart.png

Customizations

 

The script has the following self documented options:

Options:

  -h, --help            show this help message and exit

 

  Connection Parameters:

    -P PORT, --port=PORT

                        connect on this port

    -u USERNAME, --username=USERNAME

                        username to connect with

    -p PASSWORD, --password=PASSWORD

                        password to connect with

 

  Report Type:

    --sitecap=SITECAPFILE

                        Site capacity file to use for sites in report

 

  Report Options:

    --timefilter=TIMEFILTER

                        Time range to analyze (defaults to "last 1 hour"), other valid formats are: "4/21/13 4:00 to 4/21/13 5:00" or "16:00:00 to 21:00:04.546"

    --trafficexpr=TRAFFICEXPR

                        Traffic Expression to apply to report (default None)

    --resolution=RESOLUTION

                        Traffic interval resolution (e.g., 1 m, 15 m, 1 h, 6 h, 1 d)

    --percentile=PERCENTILE

                        Percentile for which to calculate utilization (along with peak) specified from 1 to 100, default is 95

    --peakthreshold=PEAKTHRESHOLD

                        Threshold on peak traffic in order to recommend upgrade, specified from 1 to 99

    --percentilethreshold=PERCENTILETHRESHOLD

                        Threshold on percentile traffic in order to recommend upgrade, specified from 1 to 99

 

The dependencies

Matplotlib (and its dependencies): Downloads · matplotlib/matplotlib · GitHub

Datetime

 

The script

The SteelScript Python script is contained within the attached zip.

 

Example execution run is as follows:

C:\test>python.exe site_capacity.py HOST -u USERNAME -p PASSWORD --sitecap ./input/input.csv --timefilter "6/11/14 8:00 to 6/11/14 16:00" --resolution "15 m"

Replace the italicized, uppercase parameters above with the information for your environment.

 

The input.csv file specified is a very basic format where the Site Name field matches the byLocation Host Group in NetProfiler

 

Site Name,WAN Bandwidth

SanFrancisco,10 Mbps

Seattle,3.088 Mbps

Phoenix,4.5 Mbps

Philadelphia,5 Mbps

Columbus,20 Mbps

DataCenter,100 Mbps

Austin,T3

Hartford,T1

LosAngeles,3.088 Mbps

 

Possible extensions to script

 

Summary report table showing upgrade recommendations and peak/percentile values

Business hour reporting

Export to PDF, rather than HTML

Reporting based on WAN Interfaces mapped to a site name, rather than Host Group