NetFlow
NetFlow documentationNetFlow
Plugin: netflow-plugin Module: netflow
Overview
Collect network flow records from NetFlow v5, v7, and v9 exporters such as routers, switches, and firewalls. Each record exposes source and destination IP, ports, protocol, bytes, packets, ToS, TCP flags, and ingress/egress interface indices. Enrichment adds GeoIP country/city/ASN, static metadata, and classifier tags.
Cisco ASA NSEL over NetFlow v9 is recognized automatically. Event-5 interval updates become directional traffic rows; create, teardown, deny, malformed, and counterless events remain diagnostics and do not enter the flow database.
For full documentation including vendor configuration examples, sampling caveats, template handling and verification steps, see the Network Flows Overview.
The plugin listens on configurable UDP listener sockets for NetFlow datagrams. NetFlow v5 and v7 records are decoded directly. NetFlow v9 records are decoded using dynamic templates cached from the exporter and persisted across restarts. Validated Cisco ASA NSEL templates automatically activate event-aware directional decoding. Decoded records are enriched in-memory and appended to disk-backed journal tiers (raw, 1-minute, 5-minute, 1-hour rollups).
This integration is supported on all platforms.
This integration runs as a single instance per Netdata Agent.
Default Behavior
Auto-Detection
The stock configuration enables the plugin and listens on the configured UDP ports.
Limits
Operational limits are driven by sustained flow records/s, exporter batching, cardinality, retention, storage speed, and enrichment. On modern hardware with fast storage, plan around 50k-100k sustained flow records/s per well-provisioned agent for the full raw + rollup pipeline, provided the underlying disks can sustain the required journal write activity; use distributed agents for larger deployments.
Performance Impact
Disabled until exporters send traffic. Once active, CPU and disk I/O scale with flow-record rate, template volume, and cardinality; size retention and storage from observed flow records/s.
Setup
Prerequisites
NetFlow-capable exporter
A router, switch, or firewall configured to export NetFlow v5, v7, or v9 datagrams to the Netdata agent’s UDP listener.
Configuration
Options
The plugin is configured via netflow.yaml in the Netdata configuration directory.
| Option | Description | Default | Required |
|---|---|---|---|
| listener.listen | UDP listener endpoints for NetFlow/IPFIX and sFlow datagrams. YAML accepts either a scalar endpoint or a list of endpoints; CLI accepts repeated --netflow-listen flags or comma-delimited values. | 0.0.0.0:2055, 0.0.0.0:6343 | no |
| protocols.v5 | Enable NetFlow v5 decoding. | yes | no |
| protocols.v7 | Enable NetFlow v7 decoding. | yes | no |
| protocols.v9 | Enable NetFlow v9 decoding. | yes | no |
| protocols.v9_template_lifetime | Maximum age of a NetFlow v9 template since its last template refresh. Set to null to disable expiry; zero is invalid. | 90m | no |
| protocols.sampling_cache_max_entries | Maximum learned NetFlow v9/IPFIX sampling-rate entries across all exporter streams. Must be positive. | 100000 | no |
| protocols.sampling_cache_max_entries_per_stream | Maximum learned sampling-rate entries for one exporter stream. Must be positive; values above the global limit are clamped. | 65536 | no |
| journal.journal_dir | Directory for journal files (relative to NETDATA_CACHE_DIR). | flows | no |
| journal.tiers.<tier>.size_of_journal_files | Per-tier retained-artifact budget for journal data and finalized per-journal facet sidecars. Replace <tier> with raw, minute_1, minute_5, or hour_1. The protected active journal can temporarily exceed the budget. Set to null for time-only retention. | 10GB | no |
| journal.tiers.<tier>.duration_of_journal_files | Per-tier maximum age. Replace <tier> with raw, minute_1, minute_5, or hour_1. The default null disables time-based eviction; set a duration to add an age cap. | null | no |
| charts.memory_diagnostics.enabled | Enable the memory diagnostics charts (netdata.netflow.memory_*). They read the process memory maps and estimate the size of in-memory structures, so they cost more than the default charts. | no | no |
| charts.memory_diagnostics.interval | How often the memory diagnostics charts update. When enabled is true, it must be at least 1s. A value that is not whole seconds is rounded up to whole seconds. | 10s | no |
via File
The configuration file name for this integration is netflow.yaml.
You can edit the configuration file using the edit-config script from the
Netdata config directory.
cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
sudo ./edit-config netflow.yaml
Examples
Basic NetFlow v5/v9 collection
Use Netdata’s stock listener set for v5 and v9 records.
enabled: true
listener:
listen:
- "0.0.0.0:2055"
- "0.0.0.0:6343"
protocols:
v5: true
v9: true
NetFlow v9 only with extended retention
Accept only v9 records, keep one day of raw data, and keep longer rollups.
enabled: true
listener:
listen: "0.0.0.0:2055"
protocols:
v5: false
v7: false
v9: true
journal:
journal_dir: flows
tiers:
raw: { size_of_journal_files: 50GB, duration_of_journal_files: 24h }
minute_1: { size_of_journal_files: 10GB, duration_of_journal_files: 14d }
minute_5: { size_of_journal_files: 10GB, duration_of_journal_files: 30d }
hour_1: { size_of_journal_files: 10GB, duration_of_journal_files: 365d }
Metrics
Metrics grouped by scope.
The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
Network flow data is stored as journal records, not as traditional metrics. Use the Network Flows view in the Netdata dashboard to query and visualize flow data. For the full list of fields and the per-protocol availability matrix, see the Field Reference. Cisco ASA NSEL event 5 emits initiator and nonzero responder directions as separate rows. Create, teardown, deny, malformed, and counterless events are excluded from traffic. The plugin also publishes the operational health metrics below. They describe collector input and processing; they are not the stored flow traffic queried by Network Flows. For visualisation guidance see Sankey and Table, Time-Series, and Maps and Globe.
Per global
These metrics describe the global Network Flows collector pipeline.
This scope has no labels.
Metrics:
| Metric | Description | Dimensions | Unit |
|---|---|---|---|
| netdata.netflow.input_packets | Netflow UDP Input Packets | udp_received, kernel_dropped, empty | packets/s |
| netdata.netflow.input_bytes | Netflow Input Bytes | udp_received | bytes/s |
| netdata.netflow.protocol_packets | Netflow Protocol Packets | netflow_v5, netflow_v7, netflow_v9, ipfix, sflow | packets/s |
| netdata.netflow.flow_sets | Netflow Sets | v9_data, v9_options_data, v9_templates, v9_options_templates, v9_missing_template, v9_ignored, ipfix_data, ipfix_options_data, ipfix_templates, ipfix_options_templates, ipfix_missing_template, ipfix_ignored | sets/s |
| netdata.netflow.templates | Netflow Template Definitions | v9_data, v9_options, ipfix_data, ipfix_options | templates/s |
| netdata.netflow.flow_records | Netflow Decoded Data Records | netflow_v5, netflow_v7, netflow_v9, ipfix | records/s |
| netdata.netflow.options_records | Netflow Options Records | netflow_v9, ipfix, sampling_data | records/s |
| netdata.netflow.sflow_samples | sFlow Samples | flow, counter, discarded_packet, rt_metric, rt_flow, unknown | samples/s |
| netdata.netflow.decoder_exceptions | Netflow Decoder Exceptions | udp_receive_errors, udp_socket_setup_errors, parse_errors, missing_template_sets, disabled_protocol_packets, parser_source_evictions, partial_counter_records, decapsulation_failed_records, unsupported_data_sets, ipfix_zero_reverse_records | events/s |
| netdata.netflow.decoder_scopes | Netflow Decoder Scope Counts | v9_sources, ipfix_sources, legacy_sources, namespaces, hydrated_sources | scopes |
| netdata.netflow.flow_rows | Netflow Row Pipeline | decoded, classifier_filtered, journaled, write_failed | rows/s |
| netdata.netflow.nsel_events | Cisco NSEL Events | update, create, teardown, denied, unsupported, malformed | records/s |
| netdata.netflow.nsel_rows | Cisco NSEL Rows | forward, reverse | rows/s |
| netdata.netflow.nsel_exceptions | Cisco NSEL Exceptions | counterless_updates, partial_counter_directions, zero_responder | events/s |
| netdata.netflow.raw_journal_ops | Netflow Raw Journal Operations | entries_written, write_errors, sync_calls, sync_errors | ops/s |
| netdata.netflow.raw_journal_bytes | Netflow Raw Journal Logical Bytes | logical_written | bytes/s |
| netdata.netflow.materialized_tier_ops | Netflow Materialized Tier Operations | minute_1_rows, minute_5_rows, hour_1_rows, flushes, write_errors, sync_calls, sync_errors | ops/s |
| netdata.netflow.materialized_tier_bytes | Netflow Materialized Tier Logical Bytes | minute_1_logical_written, minute_5_logical_written, hour_1_logical_written | bytes/s |
| netdata.netflow.tier_commit_age | Netflow Tier Commit Age | minute_1, minute_5, hour_1 | seconds |
| netdata.netflow.tier_commit_duration | Netflow Tier Commit Duration | minute_1, minute_5, hour_1 | microseconds |
| netdata.netflow.tier_commit_batches | Netflow Tier Commit Batches | minute_1, minute_5, hour_1 | batches/s |
| netdata.netflow.tier_commit_stretched | Netflow Tier Commit Stretched Windows | minute_1, minute_5, hour_1 | events/s |
| netdata.netflow.journal_io_ops | Netflow Journal Auxiliary I/O Operations | decoder_state_persist_calls, decoder_state_write_errors, decoder_state_move_errors, facet_active_update_errors, facet_lifecycle_errors, facet_persist_errors | ops/s |
| netdata.netflow.journal_io_bytes | Netflow Journal Auxiliary I/O Bytes | decoder_state_persist_bytes | bytes/s |
| netdata.netflow.open_tiers | Netflow Open Tier Rows | minute_1, minute_5, hour_1 | rows |
| netdata.netflow.tier_index_entries | Netflow Tier Index Entries | hours, flows | entries |
| netdata.netflow.facet_values | Netflow Facet Values | total, exposed | values |
| netdata.netflow.facet_fields | Netflow Facet Fields | populated, autocomplete | fields |
| netdata.netflow.memory_resident_bytes | Netflow Process Memory | rss, hwm, rss_anon, rss_file, rss_shmem, anon_huge_pages | bytes |
| netdata.netflow.memory_resident_mapping_bytes | Netflow Resident Mapping Breakdown | heap, anon_other, journal_raw, journal_1m, journal_5m, journal_1h, geoip_asn, geoip_geo, other_file, shmem | bytes |
| netdata.netflow.memory_allocator_bytes | Netflow Allocator Memory | heap_in_use, heap_free, heap_arena, mmap_in_use, releasable | bytes |
| netdata.netflow.memory_accounted_bytes | Netflow Accounted Memory | facet_archived, facet_active, facet_active_contributions, facet_published, facet_archived_paths, tier_indexes, open_tiers, geoip_asn, geoip_geo, unaccounted | bytes |
| netdata.netflow.memory_tier_index_bytes | Netflow Tier Index Memory Breakdown | row_storage, field_stores, flow_lookup, schema, index_keys, scratch_field_ids | bytes |
Alerts
There are no alerts configured by default for this integration.
Troubleshooting
Other Problems
Verifying flow data is arriving and diagnosing failures
See Troubleshooting for the full diagnostic recipe – including UDP path checks, template-error analysis, Cisco ASA NSEL event handling, and the “looks like a bug but isn’t” section (doubling, mirroring, internal-IP geolocation). See also Validation and Data Quality and Anti-patterns.
The observability platform companies need to succeed
Sign up for freeWant a personalised demo of Netdata for your use case?







