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.
| Name | Description |
|---|---|
| flows_for_ip | Print 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_flows | Print a maximum of 100 flows which contain a payload matching a specified pattern |
| pcap_simple | Retrieve all SMTP and DNS packets over the last 1 hour. This sample demonstrates the use of a Trisul Filter Format expression |
| cginfo | Print information about all available counter groups |
| tophttpflows | Print top 100 flows by volume seen in an arbitrary time interval |
| alerts_query | Print 100 alerts in last 6 hours of Priority 1, 2, 3 |
Links
You will need to refer to the following material