Skip to content

Add IPFIX support, including OpenBSD pflow(4)#162

Open
drkhsh wants to merge 1 commit into
synfinatic:mainfrom
drkhsh:main
Open

Add IPFIX support, including OpenBSD pflow(4)#162
drkhsh wants to merge 1 commit into
synfinatic:mainfrom
drkhsh:main

Conversation

@drkhsh

@drkhsh drkhsh commented Apr 26, 2026

Copy link
Copy Markdown

Closes the gap noted in the README (& closes #60)

In theory, adding sFlow/IPFIX/NetFlow v5 support should be pretty trivial, but isn't something I plan on doing due to lack of hardware for testing/need.

I have hardware (OpenBSD pflow(4) with pflowproto 10)

The change

goflow2's NewNetFlowPipe already dispatches v5/v9/v10 by header version, so IPFIX packets have always reached the producer. The gap was that formatter/mapping.yaml only declared a netflowv9: section, so for v10 packets the custom InBytes/InPackets/OutBytes/OutPackets fields stayed at zero and ntopng saw flows with 0-byte counters.

Fix: add an ipfix: block in mapping.yaml mirroring netflowv9: (IANA IEs 1, 2, 23, 24 are identical between the two protocols). No code changes, no new flags, no new deps.

Tested

  • OpenBSD pflow(4) pflowproto 10 (unidirectional, IEs 1+2) → ntopng shows non-zero in_bytes/in_packets

@rselph

rselph commented May 4, 2026

Copy link
Copy Markdown

@drkhsh, it looks like we've got parallel PR's going here. Take a look at #150. It handles a couple of time related fields as well, and tweaks the comments and doc a little more extensively. Also adds a Copilot instructions file.

Adds an `ipfix:` section to mapping.yaml so v10 packets fill the
custom InBytes/InPackets/OutBytes/OutPackets fields, the same way
netflowv9 already did. goflow2's NetFlowPipe already dispatches v10,
so no decoder changes are needed -- the producer just had no remap
for IPFIX field IDs and counters were always zero.

Tested with OpenBSD pflow(4) pflowproto 10 (unidirectional, fields
1+2 only). Bidirectional exporters that also set 23/24 work too.

Drops the README disclaimer about IPFIX not being supported.
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (28fee3f) to head (713180f).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #162   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          7       7           
  Lines        656     656           
=====================================
  Misses       656     656           

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28fee3f...713180f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR closes the IPFIX support gap by extending the goflow2 field remapping configuration so that IPFIX (NetFlow v10) records populate ntopng’s byte/packet counters correctly, and updates documentation to reflect IPFIX/OpenBSD pflow(4) support.

Changes:

  • Document IPFIX support (including OpenBSD pflow(4) with pflowproto 10) and update configuration examples in README.md.
  • Add an ipfix: decoder mapping block to formatter/mapping.yaml mirroring the existing netflowv9: counter mappings.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
README.md Updates docs to describe NetFlow v9 + IPFIX support and provides an OpenBSD pflow(4) configuration example.
formatter/mapping.yaml Adds IPFIX counter field mappings so in/out byte/packet counters are properly populated for v10/IPFIX flows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread formatter/mapping.yaml
Comment on lines +30 to +32
# IPFIX uses the same IANA Information Element IDs for these counters as NetFlow v9.
# OpenBSD pflow(4) pflowproto 10 is unidirectional and only sets fields 1 and 2;
# bidirectional exporters additionally set 23 and 24.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IPFIX support (seems to work fine)

3 participants