FastNetMon sFlow v5 export from Linux

If you have a Linux machine and you need to export traffic from it, we suggest using hsflowd. It generates sFlow v5 stream and works very well with FastNetMon Advanced.  This guide works only for machines with kernel 3.19 (CentOS 7 with standard kernel is not supported) or more recent as these kernels have support for kernel-side BPF sampling.

As a first step, please download the latest binary version for your Linux distribution.

wget https://github.com/sflow/host-sflow/releases/download/.....deb
sudo dpkg -i hsflowd...amd64.deb

And add the following to configuration file:

sudo vim /etc/hsflowd.conf

Configuration example. Replace ens3 by your interface name, replace collector IP by the address of FastNetMon and replace agentIP by the address of the router itself.):

sflow {
  DNSSD = off
  polling = 30

  agentIP = 127.0.0.1

  sampling.100M = 100
  sampling.1G   = 500
  sampling.10G  = 1000
  sampling.40G  = 4000

  sampling = 1000

  collector { ip = 127.0.0.1 udpport = 6343 }

  # Add all relevant interfaces to this list 
  pcap { dev = ens3 }
  pcap { dev = ens4 }
}

Apply changes:

sudo systemctl restart hsflowd 

Enable auto start on boot:

sudo systemctl enable hsflowd