服务器端安装Host sFlow Agent代理客户端,用作发送sFlow数据到sFlowTrend分析端,支持多种Windows/Linux/Uinx系统。
Host sFlow下载地址:http://host-sflow.sourceforge.net/
sFlowTrend下载地址:http://www.inmon.com/products/sFlowTrend.php
XenServer6可直接安装Host sFlow,XenServer5要先配置为Open vSwitch模式支持sFlow。
wget http://downloads.sourceforge.net/project/host-sflow/REL-1_22/hsflowd_XenServer_56FP2-1.22.2-1.i386.rpm
rpm -ivh hsflowd_XenServer_56FP2-1.22.2-1.i386.rpm
配置Host sFlow:
cat /etc/hsflowd.conf
#https://www.haiyun.me
sflow {
DNSSD = off
polling = 20
sampling = 512
collector {
ip = 192.168.1.155
udpport = 6343
}
}
启动Host sFlow Agent:
/etc/init.d/hsflowd start
然后在sFlowTrend配置代理端,不久即可看到监控的数据:
分析XenServer虚拟交换机sFlow数据:
ovs-vsctl -- --id=@sflow create sflow agent=xenbr0 targe=\"192.168.1.155:6343\" header=128 sampling=512 polling=30 \
-- set bridge eth0 sflow=@sflow