host-sflow icon indicating copy to clipboard operation
host-sflow copied to clipboard

No flowsamples sent on Debian 9.12

Open AlberichVR opened this issue 4 years ago • 2 comments

Hello, I installed hsflowd on a server (Debian 9.12) to monitor traffic on it (packet sampling). After configuring the hsflowd.conf file, I fetched the datagrams with a collector by using sflowtool. I receive countersamples but never flowsamples. Here is my hsflowd.conf file:

sflow {
  agent = eth0
  DNSSD = off
  sampling = 10
  polling = 20
  collector { ip=138.195.139.11 udpport=6343 }
  nflog { group = 5  probability = 0.0025 }
}

I ran beforhand the commands to configure NFLOG in iptables as it is explained. I also restarted hsflowd after modifying the conf file. I also tried another configuration (after making sure eth0 is the name of the network interface) :

sflow {
  agent = eth0
  DNSSD = off
  sampling = 10
  polling = 20
  collector { ip=138.195.139.11 udpport=6343 }
  pcap = { dev=eth0 }
}

Is packet-sampling not supported on my server or did I miss something ?

Thanks in advance for your answer,

AlberichVR

AlberichVR avatar Mar 13 '20 16:03 AlberichVR

(1) what do you get for "ldd /etc/hsflowd/modules/mod_nflog.so". Does it find all the libraries it needs?

(2) you can run with debug logging like this:

sudo systemctl stop hsflowd sudo hsflowd -dddd

Or maybe like this to look for output from mod_nflog.c:

sudo hsflowd 2>&1 | grep NFLOG

You will probably need to match your configured sampling-rate to the NFLOG probability, and you will probably need to generate significant traffic too. A good way to generate 100-200 packets/sec is like this:

sudo ping -i 0.01 <targetIP>

sflow avatar Mar 14 '20 01:03 sflow

Thanks for your input. I will try all this as soon as I can (right now I don't have access to my server...).

AlberichVR avatar Mar 15 '20 08:03 AlberichVR