Skip to main content

TRP Code Samples

Tutorial samples

Have you first read the step-by-step tutorial

If you have, then you know
* how to set up a TRP environment
* how to securely connect to a Trisul instance
* exchange a basic message

Samples in Ruby

All these samples are written in Ruby, and use the trisulrp gem. These scripts can be easily adapted to other languages like Python or Java.

We have a new Github repo called trisul-samples containing all our scripts.

NameDescription
flows_for_ipPrint top 100 flows for an IP or host during the past 6 hours.This script contains detailed line by line comments, so start here
grep_flowsPrint a maximum of 100 flows which contain a payload matching a specified pattern
pcap_simpleRetrieve all SMTP and DNS packets over the last 1 hour. This sample demonstrates the use of a Trisul Filter Format expression
cginfoPrint information about all available counter groups
sessionsPrint top 100 flows by volume seen in an arbitrary time interval
alerts_queryPrint 100 alerts in last 6 hours of Priority 1, 2, 3

You will need to refer to the following material

# The TRP Messages and Fields documentation