可梦之
有什么不可以梦之的呢?
导航
部落阁
其他博客
我的首页
联系
聚合
我的圈圈
登录
<
2010年9月
>
日
一
二
三
四
五
六
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
7
8
9
公告
My Furl
统计
随笔 - 177
文章 - 14
评论 - 51
跟踪 - 1
文章分类
memo
plan
孜孜以学
心灵之声
指点江山
杂七杂八
精彩转载
档案
2005年6月 (2)
2004年11月 (1)
2004年10月 (1)
2004年9月 (6)
2004年8月 (17)
2004年7月 (98)
2004年6月 (52)
随笔分类
UBC
天天读报
孜孜以学
指点江山
杂七杂八
生活点滴
相册
杂七杂八
杂七杂八
My Homepage @ UBC
中华复兴
博客中国
我和爱人网上的家
新雨丝
王垠的个人主页
美味书签
联合早报
高中校友录
登录
帐号
密码
记住我:
opennms流量检测功能(二)
rrdRepository:该group的rrd数据存放路径。加上ip+dsname 就是数据的完整路径。比如rrdR=/var/opennms/rrd/response ds-name=icmp ip=192.168.0.1,则数据放在/var/opennms/rrd/response/192.168.0.1/icmp.rrd中
type: high or low.和value配合使用,如果type为high,则数值超过value产生highThresholdExceeded事件,类似产生 lowThresholdExceeded事件
value:type为high,数据源数据超过value,则超过次数增加,超过此数超过trigger,则引发事件。 type为low时候类似。任何时候,只要数据源数据低于value(type=high),超过此数清零。type=low类似。
trigger:超过此数
rearm value:如果type=high,只有当数据源数据(检测到的数据)低于rearm value之后,threshold才会rearm,才能再次产生事件。比如value=100 rearm value=50,现在产生了一个highThresholdExceeded事件,如果检测到的数据一直高于100,那么不会重复产生事件。如果先降到 75,又高过100,也不产生事件。但是如果低于50了,就相当于清空了,此时再超过100,就要引发事件了。
ds-name:rrd 数据源名称
ds-type:rrd数据源类型node表明node级别的数据,if表明是interface级别的数据
thresholder工作流程
threshd 从threshd-configuration.xml中读出各个service的thresholder名。根据此名生成一个 ServiceThresholder类
用xml中读取的service名初始化ServiceThresholder.通过12两步为每个service生成一个 thresholder.比如snmp一个,http一个等等。snmp的thresholder负责所有节点/interface的snmp端口的流量 检测。所有的service对应的thresholder放在m_svcThresholders中存储以便以后使用
依次对每种service,从数据库取得支持这种service的所有node.对于每个node/service生成一个 ThresholdableService类的对象。但是此时ThresholdableService对象中只有node ip service等信息。所以调用对应service的Thresholder的intilization()函数,此函数读取 thresholder.xml配置信息,设置ThresholdableService对象属性。包括type value triggier rearm等关键信息。这样ThresholdableService的evaluate函数就可以工作了。至此,每个service对应一个 thresholder,存储在m_svcThresholders中,每个node/service对对应一个ThresholdableService, 存储在m_thresholdableServices中。
当检查某个node的某种service的流量时。先从m_svcThresholders中取得负责该service的 Thresholder.然后从m_thresholdableServices中取得该node/service对应的ThresholdableService, 然后将该ThresholdableService传递给ServiceThresholder的check方法进行比较。(这个过程不太清楚在那里实现 的。但是也无关紧要)
在check函数,先根据rrdRepositry node service等找到rrd数据文件,然后读取数据,将数据传递给node/service对对应的ThresholdableService的 evaluate,(其实是保存的thresholdEntry的函数)根据返回值产生事件。
2004年7月1日 11:31
评论
请发表评论
主题
姓名
主页
验证码
内容
Remember Me?
Powered by:
Copyright ©
可梦之
请不要发表可能给我们带来伤害的政治言论,谢谢配合