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
  • how to exchange a basic message

Samples in Ruby​

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

tip

All our scripts are in the trisul-scripts GitHub repo.

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
tophttpflowsPrint 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