sFlow is a monitoring protocol that samples network packets, application operations, and system counters. sFlow collects both interface counters and sampled 5-tuple packet information, enabling you to monitor your network traffic as well as your switch state and performance metrics. An outside server, known as an sFlow collector, is required to collect and analyze this data.
hsflowd is the service that samples and sends sFlow data to configured collectors. By default,
hsflowd is disabled and does not start automatically when the switch boots up.
hsflowd to send to the designated collectors, either:
- Use DNS service discovery (DNS-SD)
- Manually configure the
Configure sFlow via DNS-SD
You can configure your DNS zone to advertise the collectors and polling information to all interested clients.
Add the following content to the zone file on your DNS server:
The above snippet instructs
hsflowd to send sFlow data to collector1 on port 6343 and to collector2 on port 6344.
hsflowd will poll counters every 20 seconds and sample 1 out of every 2048 packets.
The maximum samples per second delivered from the hardware is limited to 16K. You can configure the number of samples per second in the
/etc/cumulus/datapath/traffic.conf file, as shown below:
Start the sFlow daemon:
No additional configuration is required in
Manually Configure /etc/hsflowd.conf
You can configure the
/etc/hsflowd.conf file to set up the collectors and variables on each switch.
/etc/hsflowd.conf and change DNSSD = on to DNSSD = off:
Set up your collectors and sampling rates in the
This configuration polls the counters every 20 seconds, samples 1 of every 2048 packets, and sends this information to a collector at 192.0.2.100 on port 6343 and to another collector at 192.0.2.200 on port 6344.
Configure sFlow Visualization Tools
For information on configuring various sFlow visualization tools, read this Help Center article.