NFCAPD(1) | General Commands Manual | NFCAPD(1) |
nfcapd
— flow
collector for netflow version v1, v5/v7 v9 and ipfix
nfcapd |
-w flowdir
[-C config]
[-z ] [-y ]
[-j ] [-D ]
[-u userid]
[-g groupid]
[-S num]
[-t interval]
[-P pidfile]
[-p port]
[-I ident]
[-b bindhost]
[-4 ] [-6 ]
[-j mcastgroup]
[-R repeater]
[-B buffsize]
[-n sourceparam]
[-M multiflowdir]
[-s rate]
[-i metricrate]
[-m metricpath]
[-e ] [-x
command] [-E ]
[-v ] [-V ] |
nfcapd
reads netflow data from the network
and stores the records into binary formated files. It accepts netflow v1,
v5/v7, v9 and ipfix transparently. It is mostly compatible with a lot of
other flow implementations such as cflow, jflow, pflow and accepts a wide
range of exporters including CISCO Flexible Netflow (FNF), ASA firewalls and
NAT devices for event logging. It has also support for a wide range of
different vendors and their implementation of netflow, such as Juniper,
VMware, PaloAlto devices and yaf. Sflow is a different technology.
nfcapd
supports a large number of netflow v9 and
ipfix elements according to the IANA assignments.
If you want to collect sflow data, please have a look at sfcapd which is also part of the nfdump tools.
nfcapd
also accepts pre-processed records
from its companion collector nfpcapd. nfcapd
safes
the flows in an output file, which is automatically rotated at a given
interval - typically every 5min. These rotated output files are stored in
the flowdir directory and are organized by timestamps.
The output files are named according to the time interval in the following
format: nfcapd.YYYYMMddhhmm e.g. nfcapd.202207110845 which contains flow
data from July 11th 2022 08:45 onwards. If the rotation interval is set to a
time, smaller then 60s, the naming extends to seconds e.g.
nfcapd.20220711084510.
nfcapd
can run in auto-expire mode
-e
, which automatically expires old flow files, at
the end of every rotation interval. nfexpire(1)
explains in more details how to setup flow expiration.
nfcapd
can run any given command
-x
or shell script at the end of each rotation
interval.
nfcapd
can send universal flow metric
information about the collected flow data (flow summary) to a UNIX socket.
Programms, such as nfinflux or
nfexporter may be used to send the metric information
to an InfluxDB or to a Prometheus monitoring system.
The options are as follows:
-w
flowdir-S
the final directory is
concatenated to flowdir/subdir.-C
confignfcapd
tries to
read the config file from the install default path
$prefix/etc/ which may be overwritten by the
environment variable NFCONF , which again is
overwritten by this option -C.
If
-C
none is specified, then
no config file is read, even if found in the search path.-p
portnum-b
bindhost-4
nfcapd
to listen on IPv4 addresses only.
Can be used together with -b if a hostname has IPv4 and IPv6
addresses.-6
nfcapd
to listen on IPv6 addresses only.
Can be used together with -b if a hostname has IPv4 and IPv6
addresses.-J
mcastgroup-R
host[/port]-I
ident-n
below.-n
ident,IP,flowdir-n
options. All exporters
send the flows to the same port -p
. Do not mix
single source configuration -I
with multiple
-n
options.-M
flowdir-D
Set daemon mode: fork to
background and detach from terminal. nfcapd
terminates on signal TERM, INT or HUP.-P
pidfilenfcapd
in start/stop
files.-u
useridnfcapd
needs to be started as user root.-g
groupidnfcapd
needs to be started as user root.-B
bufflen-S
num-t
interval-s
rate-z
-y
-j
-e
-t
nfcapd
runs an expire
cycle to delete files according to max lifetime and max filesize as
defined by nfexpire(1)-x
command-t
interval and after the file
rotate has completed, nfcapd
runs the command
command. The string for
command may contain the following place holders,
which are expanded bevore running:
-I
-m
metricpath-i
This option may by used to export flow metric
information to other systems such as InfluxDB or Prometheus. Please note:
The flow metric does not include the full record. Only the flow statistics
is sent.-i
metricrate-v
-E
-o
raw This option is for
debugging purpose only, to verify if incoming netflow data is processed
correctly.-V
nfcapd
version and exit.-h
nfcapd
returns 0 on success and 255 if
initialization failed.
https://www.iana.org/assignments/ipfix/ipfix.xhtml
https://www.cisco.com/en/US/technologies/tk648/tk362/technologies_white_paper09186a00800a3db9.html
No software without bugs! Please report any bugs back to me.
June 19, 2024 | Debian |