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 daemon that samples and sends sFlow data to configured collectors.
hsflowd is not included in the base Cumulus Linux installation. After installation,
hsflowd will automatically start when the switch boots up.
To download and install the
hsflowd package, use
You can configure
hsflowd to send to the designated collectors via two methods:
- DNS service discovery (DNS-SD)
- Manually configuring
Configuring sFlow via DNS-SD
With this method, you need to 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.
From Cumulus Linux 2.5.3 onwards, the maximum samples/second delivered from the hardware is limited to 16K. This can be configured by editing the
/etc/cumulus/datapath/traffic.conf file, as shown below:
After the initial configuration is ready, bring up the sFlow daemon by running:
No additional configuration is required in
Manually Configuring /etc/hsflowd.conf
With this method you will set up the collectors and variables on each switch.
/etc/hsflowd.conf and change DNSSD = on to DNSSD = off:
Then set up your collectors and sampling rates in
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.
Configuring sFlow Visualization Tools
For information on configuring various sFlow visualization tools, read this Help Center article.