B.2. Configuring the host sFlow agent

If you are installing the agent on Windows, then the installer will ask for the IP address of the sFlow collector as part of the installation. Just enter the IP address of your installation of sFlowTrend-Pro, and then when the installation is complete, host sFlow will be sent there.

When installing on Linux, a little more configuration is required. This can be done in two ways: either via DNS Service Discovery (DNS-SD) (see Section B.2.1, “Linux configuration using DNS Service Discovery”) or by editing a configuration file (Section B.2.2, “Linux configuration using the configuration file”). First, perform one of these configuration steps. Once complete, then start the service using the normal Linux service management command:

# service hsflowd start                

B.2.1. Linux configuration using DNS Service Discovery

If you are able to configure your local DNS servers, then the recommended way to configure host sFlow on Linux is via DNS Service Discovery. The sFlow configuration is placed into DNS records, which are then read by each sFlow host agent. This allows a large network of hosts to be easily configured and reconfigured as required.

The default configuration file is set for DNS-SD, so no changes are required there. Just add the following records to your DNS servers (used by the hosts to be monitored), and the hosts will then pick up the configuration automatically.

The following is an example configuration for DNS-SD. One TXT record should be created, with the name field _sflow._udp. This defines the overall sampling parameters for the agent. Following this, add an SRV record to specify each collector (eg instance of sFlowTrend-Pro) to send sFlow to.

_sflow._udp             TXT     "txtvers=1" "sampling=400" "polling=20"
                        SRV     0 0 6343 sflowtrend.inmon.com
                        SRV     0 0 6343

This specifies a sample rate of 1 in 400, a counter polling rate of every 20 seconds (recommended settings), and then two sFlow destinations: one host called sflowtrend.inmon.com, and another with the IP address of, both using the standard UDP 6343 sFlow port. Note that the period after an IP address is often required. For your configuration, replace the SRV entries with those appropriate to your installation.

B.2.2. Linux configuration using the configuration file

If you are unable to modify your DNS servers, or would prefer just to try out host sFlow by editing the configuration file on a few systems, then follow this example.

The configuration file is /etc/hsflowd.conf. Edit this file, and first change the line DNSSD to

DNSSD = off                

This switches off DNS-SD; otherwise, the rest of the configuration file is ignored. Then, uncomment the collector section at the end of the file, and modify to suit your installation. To have the same effect as the example in Section B.2.1, “Linux configuration using DNS Service Discovery” use this for the configuration file:

sflow {
    collector {
    collector {
        ip =
        udpport = 6343