Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configure the hsflowd sFlow Agent

This topic describes how to configure hsflowd. hsflowd is an open-source host sFlow agent designed to monitor servers, VMs, and containers. hsflowd provides resource usage statistics, performance metrics, and network traffic data by leveraging the sFlow standard.

To configure hsflowd:

  1. Install the hsflowd package.

    The installation process varies depending on your OS. For example, on a Debian-based system like Ubuntu, you can use the following commands:

    For other systems, you might need to download and compile the source code from the GitHub Repository.

  2. After you complete the installation, locate the hsflowd configuration file at: /etc/hsflowd.conf. Then, open the file with a text editor such as nano or vi.
  3. Configure the sFlow settings.

    Replace the AGENT_IP_ADDRESS with the IP address of the sFlow agent (typically the host's IP address) and x.x.x.x with the IP address of your Apstra Flow collector. You can adjust the sampling, polling, header, and datagram values as needed.

    <sFlow> <sFlowSettings> <sampling>400</sampling> <polling>20</polling> <header>128</header> <datagram>1400</datagram> <agent>AGENT_IP_ADDRESS</agent> </sFlowSettings> <collectors> <collector> <ip>x.x.x.x</ip> <udpport>6343</udpport> </collector> </collectors> </sFlow>
  4. Save and exit the configuration file.
  5. To apply the changes, restart the hsflowd service. The command you use varies depending on your OS. For a Debian-based system, such as Ubuntu, run the following command:
  6. Verify the configuration.

    To verify that hsflowd is running and exporting sFlow data, enter the following command:

    This command displays the status of the hsflowd service, indicating that the service is running and active.

You server will now start exporting sFlow data to the specified flow collector.