Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
bdfd727
feat(sources): add NetFlow/IPFIX/sFlow source
modev2301 Jul 14, 2025
1f4e4d2
Fix sFlow test, imports, TemplateCache gating, and all review nits
modev2301 Jul 14, 2025
17ec797
Refactor NetFlow source into modular structure
modev2301 Jul 17, 2025
fdb1c3d
Refactor NetFlow source into modular structure with protocol-specific…
modev2301 Jul 18, 2025
fe15e7a
Fix compilation errors and import issues in NetFlow source refactoring
modev2301 Jul 18, 2025
7ae9524
added all ipfix standard fields, also needed to change forwardingStat…
modev2301 Jul 18, 2025
6b955bf
fixed v9 test and fixed some datatypes for ipfix
modev2301 Jul 19, 2025
57ac742
chore(deps): Remove redundant async-trait workspace dependency
modev2301 Jul 20, 2025
5093e41
Remove test data and example config files
modev2301 Jul 20, 2025
c8987a7
Merge branch 'vectordotdev:master' into feature/netflow-source
modev2301 Oct 19, 2025
6652194
feat(netflow): improve template handling and reduce log noise
modev2301 Oct 19, 2025
0d7ab7a
Add debugging for template ID 1024 enterprise field parsing
modev2301 Oct 19, 2025
5859129
Fix base64 encoding compilation error
modev2301 Oct 19, 2025
9ef47d1
Fix template ID 1024 parsing for malformed HPE templates
modev2301 Oct 19, 2025
b225aa2
Reduce debugging noise for template ID 1024
modev2301 Oct 19, 2025
425060b
Fix NetFlow test compilation errors and buffering behavior
modev2301 Oct 19, 2025
bfc17b0
Add NetFlow template inspector script
modev2301 Oct 19, 2025
f0f3574
Fix IPFIX variable-length field handling
modev2301 Oct 19, 2025
2bf5804
Remove unused base64::Engine import
modev2301 Oct 19, 2025
cec1122
Improve NetFlow template inspector with debugging and filtering
modev2301 Oct 19, 2025
966955e
Add flow record validation to prevent garbage data
modev2301 Oct 19, 2025
e8f0033
Add comprehensive debugging for NetFlow template and data parsing
modev2301 Oct 19, 2025
c77fb18
Fix compilation errors in debugging code
modev2301 Oct 19, 2025
fc353d3
Update IPFIX protocol implementation and add netflow comparison docum…
modev2301 Oct 19, 2025
c2f3607
Fix Options Template parsing for Silver Peak Template 1024
modev2301 Oct 20, 2025
019111e
Fix compilation errors: add missing is_scope field to all TemplateFie…
modev2301 Oct 20, 2025
71325fe
Add proper Options Template handling with configuration control
modev2301 Oct 20, 2025
36fb20d
Implement smart defaults and simplified NetFlow configuration
modev2301 Oct 20, 2025
18bcfc7
Fix compilation errors in tests
modev2301 Oct 20, 2025
1f33822
Fix remaining compilation errors in tests
modev2301 Oct 20, 2025
fef2231
Fix Options Template parsing test
modev2301 Oct 20, 2025
d04fc1b
Fix Options Template test packet length
modev2301 Oct 20, 2025
048e0a0
Add direct function test for Options Template parsing
modev2301 Oct 20, 2025
772cdf5
Fix Options Template test with correct peer address
modev2301 Oct 20, 2025
a5f4df4
Simplify Options Template test to avoid protocol detection issues
modev2301 Oct 20, 2025
7bbe967
Make NetFlow config fields optional with smart defaults
modev2301 Oct 20, 2025
efc8ac5
Add missing HPE Aruba fields from production packets
modev2301 Oct 20, 2025
7cc2384
Update HPE Aruba field definitions based on official documentation
modev2301 Oct 20, 2025
56cac67
Add debug logging for Options Template discard mode
modev2301 Oct 20, 2025
c695ffe
Clean up NetFlow field definitions and improve config defaults
modev2301 Oct 20, 2025
6204203
Fix Deserialize conflict in NetflowConfig
modev2301 Oct 20, 2025
2bd4070
Fix PostgreSQL integer overflow for large UInt32 values
modev2301 Oct 20, 2025
5ec5dc2
Fix PostgreSQL integer overflow for all timestamp and large integer f…
modev2301 Oct 21, 2025
9aa3422
Add comprehensive IPFIX field parsing debugging
modev2301 Oct 21, 2025
d130039
Add detailed field and template debugging for overflow analysis
modev2301 Oct 21, 2025
826d4ba
Change field parsing logs from debug to info level
modev2301 Oct 21, 2025
23c6f2b
Add debugging to show actual values being inserted into LogEvent
modev2301 Oct 21, 2025
d5086e1
Add detailed UInt32 parsing debugging
modev2301 Oct 21, 2025
070aa5a
Clean up NetFlow source code and remove debugging artifacts
modev2301 Oct 21, 2025
bcf6e29
Remove Options Template info logging
modev2301 Oct 21, 2025
9fb4cf4
Remove unnecessary NetFlow debugging files and examples
modev2301 Oct 21, 2025
0715327
Add NetFlow source implementation
modev2301 Oct 21, 2025
4c8bde6
Add changelog fragment for NetFlow source feature
modev2301 Oct 21, 2025
e3443a3
Add NetFlow and IPFIX to spelling allow list
modev2301 Oct 21, 2025
5b78016
Update netflow_source.feature.md
modev2301 Oct 22, 2025
d88b57b
feat(netflow): implement performance optimizations and timing validat…
modev2301 Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -554,3 +554,5 @@ zst
zstandard
ZTE
Zync
IPFIX
netflow
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ sources-logs = [
"sources-file_descriptor",
"sources-redis",
"sources-socket",
"sources-netflow",
"sources-splunk_hec",
"sources-stdin",
"sources-syslog",
Expand Down Expand Up @@ -688,6 +689,7 @@ sources-prometheus-pushgateway = ["sinks-prometheus", "sources-utils-http", "vec
sources-pulsar = ["dep:apache-avro", "dep:pulsar"]
sources-redis = ["dep:redis"]
sources-socket = ["sources-utils-net", "tokio-util/net"]
sources-netflow = ["sources-utils-net-udp", "tokio-util/net", "dep:base64"]
sources-splunk_hec = ["dep:roaring"]
sources-statsd = ["sources-utils-net", "tokio-util/net"]
sources-stdin = ["tokio-util/io"]
Expand Down
3 changes: 3 additions & 0 deletions changelog.d/netflow_source.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Add NetFlow source implementation supporting NetFlow v5, NetFlow v9, IPFIX, and sFlow protocols. The implementation includes sophisticated template management, enterprise field support, template buffering for missing templates, and comprehensive error handling. Supports all major flow protocols with configurable enterprise field parsing and template caching.

authors: modev2301
67 changes: 67 additions & 0 deletions config/examples/netflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# NetFlow Source Example
# ------------------------------------------------------------------------------
# This example demonstrates how to collect NetFlow, IPFIX, and sFlow data
# from network devices and export them to various destinations.
#
# Docs: https://vector.dev/docs/reference/configuration/sources/netflow

data_dir: "/var/lib/vector"

# Collect NetFlow data from network devices
# Example: NetFlow v5, v9, IPFIX, and sFlow packets from routers/switches
# Docs: https://vector.dev/docs/reference/configuration/sources/netflow
sources:
netflow_data:
type: "netflow"
address: "0.0.0.0:2055"
protocols: ["netflow_v5", "netflow_v9", "ipfix", "sflow"]
max_packet_size: 65535
max_templates: 1000
template_timeout: 1800
parse_enterprise_fields: true
parse_options_templates: true
parse_variable_length_fields: true
buffer_missing_templates: true
max_buffered_records: 1000

# Parse and enrich the flow data
# Docs: https://vector.dev/docs/reference/configuration/transforms/remap
transforms:
flow_parser:
inputs: ["netflow_data"]
type: "remap"
source: |
# Add timestamp if missing
if !exists(.timestamp) {
.timestamp = now()
}

# Add source information
.source = "netflow"

# Parse IP addresses for better visualization
if exists(.src_addr) {
.src_ip = parse_ip!(.src_addr)
}
if exists(.dst_addr) {
.dst_ip = parse_ip!(.dst_addr)
}

# Send to Elasticsearch for analysis
# Docs: https://vector.dev/docs/reference/configuration/sinks/elasticsearch
sinks:
elasticsearch:
inputs: ["flow_parser"]
type: "elasticsearch"
endpoint: "http://localhost:9200"
index: "netflow-%Y-%m-%d"
encoding:
codec: "json"

# Also send to console for debugging
# Docs: https://vector.dev/docs/reference/configuration/sinks/console
console:
inputs: ["flow_parser"]
type: "console"
encoding:
codec: "json"
2 changes: 2 additions & 0 deletions src/sources/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ pub mod pulsar;
pub mod redis;
#[cfg(feature = "sources-socket")]
pub mod socket;
#[cfg(feature = "sources-netflow")]
pub mod netflow;
#[cfg(feature = "sources-splunk_hec")]
pub mod splunk_hec;
#[cfg(feature = "sources-static_metrics")]
Expand Down
Loading
Loading