Set up TSR Sink for NatEvent IPFIX messages
Traffic Stream Reporter (TSR) that handles NatEvent IPFIX messages, stores information about Network Address Translation (NAT) events. It stores internal IP source addresses and ports, the public IP source addresses and ports (NAT binding), the IP destination addresses and ports, and the used protocol. Additionally, IMSI, the NAT event (start, stop), the start and end time of the NAT binding are stored.
Prerequisites
- Kubernetes 1.18Opens in a new tab or newer
- Helm clientOpens in a new tab 3.9.2 or newer
- MySQL database
Steps
Create a namespace for your TSR installation:
bashCreate a TSR Sink configuration file that specifies the port on which Sink receives the IPFIX packets. The configuration file also contains a reference to your deployed MySQL database that stores data into the
natev_$daytable.yamlInstall TSR Sink on the cluster:
bashFetch all natevents from the database with the SQL statement below. The table name is
natev_YEAR_MONTH_DAY.sql
Trooubleshooting
Depending on the number of the incomming IPFIX messages, there are a few settings that are helpful to handle higher load.
In the configuration in step 2, it persists every 5 seconds (db.persist.duration) or 500 messages (buffer.persist), whichever conditions is met first.
It can be beneficial to increase these values, so that fewer statements are sent to the database.
There is also the option to change the storage engine of the database to ARCHIVE.
Compared to InnoDB, inserting data with the ARCHIVE setting is faster but querying the data is slower.