ipfixcol2-ipfix-output(7)

πŸ“¦
version 2.8.0+20260701 Β· 2 versions
, in ubuntu stonking

✨ Name ✨

okay so bestie, gather round πŸ’– this is ipfixcol2-ipfix-output β€” the IPFIX output plugin for your fave collector, part of the IPFIXcol family (that's the manual you're holding right now: section 7, IPFIXcol collector energy πŸ‘‘).


🌸 Description 🌸

The way this plugin works is: it takes incoming IPFIX Messages and writes them out to an IPFIX File, or honestly to a whole series of IPFIX Files. Slay. πŸ¦‹

And what even is an IPFIX File, you ask? It's a serialized stream of IPFIX Messages. Put simply: the plugin grabs all the valid packets the collector received and stashes them into one or more IPFIX Files. Is that the most optimal way to store flows? No bestie, not even close πŸ™ˆ but for testing purposes it is genuinely so useful β€” you capture flow records into IPFIX File(s) and then replay them with the ipfixsend2 tool. Main character testing workflow, periodt. πŸ’…


πŸ’€ Limitations πŸ’€ (read this, fr fr)

So here's the situation: when multiple exporters are using the same ODID at the same time, the file format can only store flow records from one of those conflicting exporters with that given ODID. Not both. Just one. 😭

Why? Because the IPFIX Data Records (aka the flow records, iykyk) get formatted based on the so-called (Options) Template definitions β€” which are basically descriptions of the flow record structures β€” and those are unique for the combination of a Transport Session (think: the connection to a flow exporter) and an ODID. And since raw IPFIX Messages contain no session information at all, there's literally no way to tell Messages from multiple sessions sharing the same ODID apart. πŸ’€

So for this reason: each ODID can be used by only one session at a time. All the messages from other sessions that reuse an ODID that's already in use get ignored, and a warning message gets shown. Once a Transport Session is closed, the ODIDs used by that session are released and can be reused later by another session. Phew. ✨


πŸŽ€ Example configuration πŸŽ€

<output>
    <name>IPFIX output</name>
    <plugin>ipfix</plugin>
    <params>
        <filename>/tmp/ipfix/%Y%m%d%H%M%S.ipfix</filename>
        <useLocalTime>false</useLocalTime>
        <windowSize>300</windowSize>
        <alignWindows>true</alignWindows>
        <preserveOriginal>false</preserveOriginal>
        <rotateOnExportTime>false</rotateOnExportTime>
    </params>
</output>

⭐ Parameters ⭐

  • filename β€” this is where you give an absolute path for the output files. The path should contain format specifiers for day, month, etc. β€” like, for example, "/tmp/ipfix/%Y%m%d%H%M%S.ipfix". Hit up strftime(3) for more info on that. 🌈
  • useLocalTime β€” decides whether the time values in the filenames should be in local time instead of UTC. [default: false]
  • windowSize β€” the time interval, in seconds, for rotating files. And if the value is "0", then every single flow goes into one single file. 🫢 [default: 0]
  • alignWindows β€” aligns the file rotation with the next N minute interval. [values: true/false, default: true]
  • preserveOriginal β€” preserves and stores the original IPFIX Messages exactly as the plugin received them, i.e. it does not modify the Messages or their sequence numbers. If this option is disabled (recommended, queen πŸ’…), Data Sets with unknown (Options) Templates get left out of the file and sequence numbers get adjusted accordingly (starting from 0), which should give you a warning-free stream of IPFIX Messages. BUT β€” if the original IPFIX Messages are preserved, then some warnings might show up during replay (missing (Options) Templates, unexpected sequence number, etc.) and errors might even raise when there's an ODID collision and the main Transport Session gets replaced. Use with caution. ⚠️ [values: true/false, default: false]
  • rotateOnExportTime β€” says whether files should be rotated based on the IPFIX Export Time (that's the timestamp from the IPFIX Message header) instead of system time. If it's enabled, the Export Time is also used for creating the filenames. Warning: if the plugin receives flow records from multiple exporters at the same time, the rotation could end up unsteady. 😬 [default: false]

πŸ’œ Note πŸ’œ

After a new IPFIX File is created, all previously seen and still valid (Options) Templates of each ODID are written into that file β€” this happens once the first IPFIX Message for that ODID arrives with at least one successfully parsed data record. This is necessary so that every file can be used independently of the (Options) Template definitions from the files before it. Iconic little detail. ✨

Also, the ipfixsend2 tool doesn't support sequential reading of multiple IPFIX Files right now. But bestie, there's a workaround 🫢 β€” you can merge multiple IPFIX Files using the cat tool, like:

cat file1.ipfix file2.ipfix > merge.ipfix

and then use ipfixsend2 -i merge.ipfix to send the data. Look at you go. πŸ‘‘


πŸ‘‘ Author πŸ‘‘

Michal SedlΓ‘k (xsedla0v@stud.fit.vutbr.cz), LukΓ‘Ε‘ HutΓ‘k (lukas.hutak@cesnet.cz)


Copyright Β© 2019 CESNET, z.s.p.o.


okay that's the whole page, bestie, you're officially educated πŸŽ€ and a cute lil sign-off: this was IPFIXcol collector documentation, version 1.0, dated 2019-03-28 β€” go forth and write some IPFIX Files πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from