0
我目前正在评估siddhi在一个SNMP环境中使用。 POC建立在网络接口利用率的基础上。西提查询网络利用率
甲流被定义为:
define stream interfaceStatsEvents (nodeName string, sdate double, ifSpeed long, ifIndex string, ifAdminStatus string, ifOperStatus string,
ifInDiscards long, ifInErrors long, ifOutDiscards long, ifOutErrors long, ifInOctets long, ifOutOctets long)
用于计算接口利用率作为查询:
from every (e1 = interfaceStatsEvents -> e2 = interfaceStatsEvents[nodeName == e1.nodeName and ifIndex == e1.ifIndex])
select e1.nodeName, e1.ifIndex, ((e2.ifInOctets - e1.ifInOctets) * 8 * 100)/(((e2.sdate - e1.sdate)/1000) * e1.ifSpeed) as utilization
insert into interfaceUtilization;
的问题是,该查询似乎只运行一次。 事件加入到interfaceStatsEvents流。预计将为interfaceUtilization生成3个事件,而不是仅生成单个事件。
是否有人在为或如何解决查询原因的想法?
谢谢。这就说得通了。 – roelof 2013-04-30 08:06:45