ipfixcol2-udp-input(7)

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

πŸ’– ipfixcol2-udp-input β€” the UDP input plugin, bestie edition πŸ’–

okay so first things first: this is a page from the IPFIXcol collector manual, section 7, and the star of the show is ipfixcol2-udp-input β€” the UDP (input plugin). yes, that's it, that's the whole NAME section, but make it cute: UDP (input plugin). πŸ¦‹


✨ DESCRIPTION ✨

So what does this plugin even do? It grabs IPFIX messages flying over the UDP transport protocol, coming from one or more exporters, and hands them straight into the collector. 🫢

You can run multiple instances of this plugin at the same time, no problem β€” but bestie, they must listen on different ports or different local IP addresses. No doubling up, it's giving main character only. πŸ’…

Now the important lore: the connection between the exporter and the collector is unreliable, because, well… UDP. πŸ™ˆ And the IPFIX protocol itself is unidirectional β€” the collector can only receive. It can't talk back. It's a listener, not a chatter. πŸ‘‘

And here's the thing about templates: different exporters measure different features of flows, so IPFIX defines templates that describe the structure of the flow records being transmitted. The collector uses those templates to actually interpret what it's receiving. 🧚

Over UDP, exporters regularly retransmit their templates. But β€” plot twist β€” if the collector starts after an exporter, it could miss all the templates. And if it misses them, it's literally unable to interpret records until the next retransmission. So yeah, it can take up to a few minutes for that first record to be successfully interpreted. How long exactly? Depends on the template retransmission interval of the exporter. ⏳

⚠️ Warning, and this one's serious: one of the most common causes of lost flow records over UDP is an undersized receive buffer on a system socket. The actual size of the buffer your OS gives you is limited by operating-system-level maximums. The plugin automatically bumps the default size up to the maximum size during startup β€” slay β€” but even so, that size is usually not optimal for monitoring a high-speed network or for receiving from multiple exporters. So it is recommended to increase the limits before you start the collector. πŸ’€

For most Linux distributions you can just use a command like this one (the value is in bytes):

sysctl -w net.core.rmem_max=16777216

🌸 Example configuration 🌸

Here's what it looks like in the wild, no cap:

<input>
    <name>UDP input</name>
    <plugin>udp</plugin>
    <params>
        <localPort>4739</localPort>
        <localIPAddress></localIPAddress>
        <!-- Optional parameters -->
        <connectionTimeout>600</connectionTimeout>
        <templateLifeTime>1800</templateLifeTime>
        <optionsTemplateLifeTime>1800</optionsTemplateLifeTime>
    </params>
</input>

πŸŽ€ PARAMETERS πŸŽ€

The mandatory ones (you literally have to)

  • localPort β€” the local port the plugin listens on. [default: 4739]
  • localIPAddress β€” the local IPv4/IPv6 address this UDP input plugin listens on. If you leave the element empty, the plugin binds to all available network interfaces. You can also repeat this element multiple times (one IP address per occurrence) to manually hand-pick multiple interfaces. [default: empty]

The optional ones (vibes only, if you want them)

  • connectionTimeout β€” exporter connection timeout, in seconds. If no message arrives from an exporter for the specified time, that connection is considered closed and all resources associated with that exporter get yeeted β€” things like flow templates, etc. [default: 600]
  • templateLifeTime, optionsTemplateLifeTime β€” (Options) Template lifetime in seconds for all UDP Transport Sessions terminating at this UDP socket. (Options) Templates that aren't received again within the configured lifetime become invalid. ✨ Pro tip from the source material: the lifetime of Templates and Options Templates should be at least three times higher than the same values configured on the corresponding exporter. [default: 1800]

πŸ’œ AUTHOR πŸ’œ

LukΓ‘Ε‘ HutΓ‘k (lukas.hutak@cesnet.cz), Petr Velan (petr.velan@cesnet.cz) β€” icons, honestly. πŸ‘‘


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


and that's the whole page, bestie β€” version 2.0, dated 2018-09-20, straight out of the ipfixcol2-udp-input(7) manual. go configure something iconic. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from