Git Product home page Git Product logo

anguenot / ipfix-forwarder Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 2.0 51 KB

ipfix-forwarder listens for IPFIX (RFC 5101) streams sent over UDP, parses, pre-processes, includes (VMware) vendor fields, converts to JSON and optionally can forward JSON string representation to a custom syslog destination.

License: Other

Makefile 4.40% Go 95.60%
ipfix netflow syslog networking vmware-nsx vmware-vsphere golang go

ipfix-forwarder's Introduction

ipfix-forwarder

alt text APACHE2 License

ipfix-forwarder listens for IPFIX (RFC 5101) streams sent over UDP, parses, pre-processes, includes extra (VMware, Nokia) vendor fields, converts to JSON and optionally can forward JSON string representation to a custom syslog destination.

In addition to IPFX standard fields, it also knows how to interpret and include the following vendor IPFIX fields:

  1. VMware NSX
  2. VMware vSphere Distributed Switch (VDS)
  3. Nokia NAT

If using these vendors above the JSON will include an extra field named nsxSegmentId which will correspond to the edge segmentId. It then becomes trivial to bind a flow to corresponding inventory entities.

You can choose to export the JSON to a custom syslog destination.

This server does not yet directly natively export flows to Apache Kafka. If you are looking to export your IPFIX flows to Apache Kafka, you can use ipfix-forwarder along with syslog-ng and the syslog_kafka destination.

Examples

Start ipfix-forwader on udp://0.0.0.0:2055, interpret and include VMware vendor fields, log in console with a verbosity of 1.

$ ./ipfix-forwarder -logtostderr -v 1 -vendor-vmware-vds -vendor-vmware-nsx

Start ipfix-forwader on udp://0.0.0.0:2055, interpret and include VMware vendor fields, log in console and file with a verbosity of 1 and export to a syslog server on udp://10.10.11.41:2056

$ ./ipfix-forwarder -alsologtostderr -v 1 -vendor-vmware-vds -vendor-vmware-nsx -export-json-to-syslog -export-syslog-host 10.10.11.41 -export-syslog-port 2056 

Usage

$ ./ipfix-forwarder -h

usage: ipfix-forwarder [server-flags] [vendor(s)] [syslog-export-info] [logging-properties]

  -alsologtostderr
        log to standard error as well as files
  -export-json-to-syslog
        export flows to syslog server in JSON format
  -export-syslog-host string
        syslog server address for JSON exports. (default "127.0.0.1")
  -export-syslog-port int
        syslog server port forJSON exports. (default 514)
  -export-syslog-program string
        syslog message program for JSON exports. (default "ipfix-forwarder")
  -export-syslog-proto string
        syslog server proto for JSON exports. (default "UDP")
  -log_backtrace_at value
        when logging hits line file:N, emit a stack trace
  -log_dir string
        If non-empty, write log files in this directory
  -logtostderr
        log to standard error instead of files
  -num-cpu int
        Number of CPUs to leverage. (default `runtime.NumCPU()`)
  -server-address string
        IP the server will be listening to. (default "0.0.0.0")
  -server-port int
        Port we will be listening on. (default 2055)
  -server-rcvbuf int
        Size of OS receive buffer associated with the connection. (default 2097152)
  -server-sndbuf int
        Size of OS transmit buffer associated with the connection. (default 2097152)
  -stderrthreshold value
        logs at or above this threshold go to stderr
  -v value
        log level for V logs
  -vendor-nokia
        Include Nokia NAT vendor fields.
  -vendor-vmware-nsx
        Include VMware NSX vendor fields.
  -vendor-vmware-vds
        Include VMware vSphere Distributed Switch (VDS) vendor fields.
  -version
        Version
  -vmodule value
        comma-separated list of pattern=N settings for file-filtered logging

Download

You can find latest binary releases for linux/amd64 here

Build it

You will need Go 1.13.x installed.

$ make build

ipfix-forwarder's People

Contributors

anguenot avatar gen2brain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.