NAME

traffic_capture_to_file.pl - Start a traffic capture on a Grid member and download it to a local file.

VERSION

The initial template usually just has:

traffic_capture_to_file.pl version 0.0.1

USAGE

Traffic capture of 60 seconds from Grid member ns2.ad.example.com:

    traffic_capture_to_file.pl -s=192.168.1.2 -u=admin -p=infoblox -m=ns2.ad.example.com -l=60

REQUIRED ARGUMENTS

I have not put in extensive argument checking, you should use:

    -s=<grid master IP>
    -u=<username>
    -p=<password>
    -m=<member name>
    -l=<length of capture in seconds>

OPTIONS

The options are as follows

-s

The IP address of the Grid Master.

-u

Valid username on the Grid that has persmission to run a traffic capture.

-p

Password of the user.

-m

Member name (FQDN) where you want to run the traffic capture.

-l

Length of the capture in seconds.

-d

Some debug output of the requests between client and server i.e. the script and the Grid Master.

--help|?

Print this summary

--man

Displays the complete manpage then exits gracefully.

DESCRIPTION

Connects to the GM and verifies the connection. Starts a traffic capture and then waits for that + 10 seconds. Obtains a URL to download the file and a token to signal to the GM when the download is complete. Downloads the file locally with the same name as the original capture; this includes the member name and a timestamp. Signals to the GM to remove the file.

DIAGNOSTICS

The script will die on any error.

CONFIGURATION AND ENVIRONMENT

In the script is a minimum WAPI version. This is set to 2.7, but I also tested this on 2.6.1. YMMV.

I hardcoded a 10 second wait after the traffic capture should have finished before starting the download. It is possible this needs to be increased, perhaps if the captures are very large. I am unsure if the captures are copied to GM after completing or the data is streamed in some way, so I arbitrarily chose a 10 second wait. This could be changed to an option.

DEPENDENCIES

REST::Client

INCOMPATIBILITIES

None known.

BUGS AND LIMITATIONS

Wow! REST::Client, maybe not the best and the documentation leaves something to be desired.

AUTHOR

Jim Mozley ( jmozley@infoblox.com )

LICENCE AND COPYRIGHT

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.