[netflow-tools] relaying of flows to unix domain socket
djm at mindrot.org
Thu Aug 25 08:14:51 EST 2005
Tonight's flowd snapshot (20050825+) will have another useful feature
in it: relaying of flows (in flowd's storage format) to a local Unix
domain socket in real time. Just specify "logsock" instead of, or in
addition to the current "logfile" parameter in flowd, with a path to
the socket. E.g.
This allows you to build lightweight monitor applications that do their
thing in realtime. I will probably write something to update rrd
databases with basic stats for the next release, but the new Python API
makes this mode really able to use. The following Python program is a
minimal client for this mode in 10 lines of code.
This feature is still considered experimental for this release, until
it receives more widespread testing and feedback.
s = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
flowrec = s.recv(1024)
flow = flowd.Flow(blob = flowrec)
More information about the netflow-tools