10.09.2018

FastNetMon sFlow v5 export from Linux

If you have 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 or more recent because these kernels have support for kernel side BPF sampling.

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

cd /tmp
wget https://github.com/sflow/host-sflow/releases/download/v2.0.11-1/hsflowd-ubuntu16_2.0.11-1_amd64.deb
dpkg -i hsflowd-ubuntu16_2.0.11-1_amd64.deb

And add following to configuration file:

sudo vim /etc/hsflowd.conf

Configuration example (please replace ens3 by your inetrface name):

sflow {
DNSSD=off
polling=30

agentIP=127.0.0.1

# Change it for your link
sampling.100M=10
sampling.1G=10
sampling.10G=10
sampling.40G=10
sampling=10
collector { ip = 127.0.0.1 udpport = 6343 }
pcap { dev=ens3 }
}

Apply changes:

sudo service hsflowd restart

Enable autostart (only Ubuntu 16.04+):

sudo systemctl enable hsflowd