¡m¤À¨É¡n³z¹LThreshold³]©wºô¥d¬y¶q§iĵ¾÷¨î | |
Switch¡BRouterµ¥ºô³q³]³Æ³z¹LSNMP¯Ç¤JOpenNMSºÞ²z«á¡A¤w¥i¥H¬Ý¨ìºô¥d¬y¶q¡C
¨º»ò¦³¨S¦³¿ìªk§ó¤@¶i¨Bªº³]©w¬y¶q§iĵ¾÷¨î¡H
·í¤W¤U¸ü¬y¶q¨ì¹F¤@ÓÁ{¤¶È®É¡Aµo¥X³qª¾«H¡A§iª¾ºôºÞ¤Hû¡H
¦³ªº¡A¦bOpenNMS¤¤¥i¦bManage Thresholds¤¤¶i¦æ³]©w¡C
OpenNMS¤¤¹w³]¤w«Ø¥ß7ÓÃþ«¬ªºthresholsÃþ§O²ÕºA¡Aùر¦³¦U¦ÛªººÊ±±½d¥»¥i¨Ñ°Ñ¦Ò¡C
¦Óºô¥dºÊ±±´N¬O¦bmib2³o¤@¶µ¡C
¶i¤Jmib2ªºthreshold¡A¥i¬Ý¨ìùر¦³1Ó°ò¥»«¬(Basic)»P4Ó¹Bºâ«¬(Expression-based)ªºthresholds½d¨Ò¡C
Y¬O°ò¥»È¤ñ¸û¡A¥i«Ø¥ßBasic thresholds¡A
Y¬O¦³½ÆÂøpºâ¡A¥i«Ø¥ßExpression-based thresholds¡C
¦]¬°SNMP¦bmib2ùاì¨ìªº«Ê¥]¤j¤p¬°byte¡A¦Ó¶¶¤l·Q°µªº§iĵ±ø¥ó¬O¤U¸ü¬y¶q¤j©ó´XM(bit)®É¡Aµo¥Xĵ§i¡A
¨âªÌ¤§¶¡»Ýn°µ³æ¦ìÂà´«¡A¥ÎExpression-based thresholds¤ñ¸û¾A¦X¡C
n«Ø¥ß¤@Ó¤U¸ü¬y¶q¤j©ó10M(bit)ªº§iĵ¾÷¨î¡A¥i°Ñ¦Ò¶¶¤l¤U¹Ïªº³]©w¡A»¡©ú¦p«á¡C
- Type high¡A¥Nªí°ª©ó«ázExpressionªº±ø¥ó®É¡A¶i¦æIJµo¡C
- Expression ifInOctets * 8 / 1000000¡AifInOctets¬°¶iºô¥dªº«Ê¥]¤j¤p(³æ¦ì¬°byte)¡A¼¤W8Âà´«¬°bit¡A¦A°£¥H1000000Âà´«¬°M(bit)¡C
- Datasource Type interface¡A¸ê®Æ¨Ó·½Ãþ«¬¡A¿ï¾Üºô¥dinterface¡C
- Datasource label ifName¡A¨ä¥¦mib2 thresholds½d¨Ò³£¥´ifName¡A¸òµÛ¥´ifName¡C
- Value 10¡AIJµothresholdªºÁ{¤¶È¡C¥´¤W10¡A¥Nªí¶W¹L10MIJµo§iĵ¾÷¨î¡C
- Re-arm 3¡A¦^´_¥¿±`ª¬ºAªºÁ{¤¶È¡C¥´¤W3¡A¥Nªí¤p©ó3M¡A§iĵª¬ºA¸Ñ°£¡C
- Trigger 1¡Aµo¥Í´X¦¸«á¡AIJµo§iĵ¾÷¨î¡C¹w³]1¦¸¡C
- Description¡A¦¹thresholdªº´yz¡C
- Triggered UEI»PRe-armed UEI¡A¶¶¤l¤£¤ÓÀ´¡A¥i¯d¥Õ¨Ï¥Î¹w³]ªº¡C
- ¾ãÓthresholdªº¸ÑŪ¬O¡A·í¤U¸ü(ifInOctets)¬y¶q¤j©ó10M®É¡Aµo¥Xĵ§i¡F·í¤p©ó3M®É¸Ñ°£Äµ§i¡C
¦ý§Ú¥u·QºÊ±±¬Yport¡A¤£·Q¥þ³¡ºÊ±±¸Ó«ç»ò°µ©O¡H
¨Ò¦p¶¶¤l¤½¥qªºCyberoam¨¾¤õÀð¨äPort D¬OWAN port¡A¨ä¥¦³£¬O¤º³¡¨Ï¥Îªºport¡A
¶¶¤l¥u·QºÊ±±Port D¡A¸Ó¦p¦ó¥h½Õ¾ã©O¡H
³oÓ³¡¤À¥i³z¹LResource Filters¨Ó³]©w±ø¥ó¡A¦ý§ÚÌÁÙ¬O¥²»Ý¬ÝÀ´¤Þ¥Îªºmib2.xml¤º®e¡A¤~¯à³]©w¹LÂo±ø¥ó¡F
¦]¬°¯à°µ¬°Resource Filtersªº±ø¥óÄæ¦ì¡A¤]¥²»Ý¬O¦P¤@group¤¤ªºmibObj oid¡C
mib2.xml¦ì©ó¥H¤U¸ô®|¡C
/usr/share/opennms/etc/datacollection/mib2.xml
¨ä«ÂI¤º®eÂ^¨ú¦p¤U¡C
<!-- data from standard (mib-2) sources -->
<group name="mib2-interfaces" ifType="all">
<mibObj oid=".1.3.6.1.2.1.2.2.1.2" instance="ifIndex" alias="ifDescr" type="string" />
<mibObj oid=".1.3.6.1.2.1.2.2.1.5" instance="ifIndex" alias="ifSpeed" type="string" />
<mibObj oid=".1.3.6.1.2.1.2.2.1.10" instance="ifIndex" alias="ifInOctets" type="counter" />
<mibObj oid=".1.3.6.1.2.1.2.2.1.11" instance="ifIndex" alias="ifInUcastpkts" type="counter" />
<mibObj oid=".1.3.6.1.2.1.2.2.1.12" instance="ifIndex" alias="ifInNUcastpkts" type="counter" />
<mibObj oid=".1.3.6.1.2.1.2.2.1.13" instance="ifIndex" alias="ifInDiscards" type="counter" />
<mibObj oid=".1.3.6.1.2.1.2.2.1.14" instance="ifIndex" alias="ifInErrors" type="counter" />
<mibObj oid=".1.3.6.1.2.1.2.2.1.16" instance="ifIndex" alias="ifOutOctets" type="counter" />
<mibObj oid=".1.3.6.1.2.1.2.2.1.17" instance="ifIndex" alias="ifOutUcastPkts" type="counter" />
<mibObj oid=".1.3.6.1.2.1.2.2.1.18" instance="ifIndex" alias="ifOutNUcastPkts" type="counter" />
<mibObj oid=".1.3.6.1.2.1.2.2.1.19" instance="ifIndex" alias="ifOutDiscards" type="counter" />
<mibObj oid=".1.3.6.1.2.1.2.2.1.20" instance="ifIndex" alias="ifOutErrors" type="counter" />
</group>
§ÚÌ¥i¥Hµo²{°£¤F .1.3.6.1.2.1.2.2.1.12 ªº ifInOctets ¥~¡A
ÁÙ¦³ .1.3.6.1.2.1.2.2.1.16 ªº ifOutOctets ¥i¨Ñ§ÚÌ°µ¬y¶q¤W¶ÇªººÊ´ú¨Ï¥Î¡C
¦ý«ÂI¬O .1.3.6.1.2.1.2.2.1.2 ªº ifDescr ºô¥d´yz¡A
¤£¦Pport·|¦³¤£¦Pªº¦WºÙ´yz ifDescr¡A
§ÚÌ¥i¥H³z¹L³oÓ ifDescr ÄÝ©Ê¡A¨Ó°µ¬°ºô¥d¹LÂoªº±ø¥ó¡C
¨Ï¥Îsnmpwalk¨Óquery¥Ø¼Ðª«Cyberoam 192.168.33.2ªº .1.3.6.1.2.1.2.2.1.2 ¤º®e¡A¥i±o¨ì¦p¤U¹Ïªºµ²ªG¡C
¦b±oª¾Port Dªº ifDescr ¦WºÙ¬° PortD «á¡A
§ÚÌ´N¥i¥H§â³oÓ ifDescr °µ¬°¹LÂo±ø¥ó¥[¨ìthreshold¤¤¡C
¨Æ¹ê¤W³oÓ¦WºÙ¤]¥i¥H¦bNodeªºPhysical Interfaces¤¤¨ú±o¡C
³Ì«á§O§Ñ¤F¥h½T»{PortD interfaceªº Collect ¥\¯à¬O§_¤w¸g¿ï¦n¡C
¤@¤Á´Nºü«á¡A·íCyberoamªºPort D¤U¸ü¬y¶q¶W¹LÁ{¤¶È10M®É¡A´N·|IJµo§iĵ¾÷¨î¡C
ºÞ²zûªºemail´N·|¦¬¨ì³qª¾«H¡I
·í¬y¶q°¦^3M¥H¤U®É¡A¤]·|¦¬¨ìĵ³ø¸Ñ°£ªº³qª¾«H¡C
¥H¤Wªºthreshold³]©w·|Àx¦s¦b¦p¤Uªº³]©wÀɤ¤¡C
/usr/share/opennms/etc/thresholds.xml
¦¹¥~¡AY§ÚÌ·QnÅܧóthresholdªº°»´ú®É¶¡©Î¬O¹ï¯S©wIP¨Ó¶i¦æ±½´y©Î±Æ°£¡A
¨º»ò§ÚÌ¥²»Ý³z¹Lקï¥t¤@Ó³]©wÀÉ threshd-configuration.xml ¨Ó¹ê²{¡A¨ä¸ô®|¦p¤U¡C
/usr/share/opennms/etc/threshd-configuration.xml
¥H¥»¨Ò¨Ó»¡¡A»Pºô¥d¬ÛÃöªºpackage mib2¨ä¤º®e¦p¤U¡C
<package name="mib2">
<filter>IPADDR != '0.0.0.0'</filter>
<include-range begin="1.1.1.1" end="254.254.254.254"/>
<include-range begin="::1" end="ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff" />
<service name="SNMP" interval="300000" user-defined="false" status="on">
<parameter key="thresholding-group" value="mib2"/>
</service>
</package>
§ÚÌ¥i¥H¬Ý¨ì¹w³]ªº°»´ú®É¶¡¶¡¹j¬°300000²@¬í¡A¤]´N¬O5¤ÀÄÁ¡A
Y·QÁYµu®É¶¡¶¡¹j¬°1¤ÀÄÁ¡A¥iª½±µ×§ï interval °Ñ¼Æ¨Ó¹F¦¨¡C
¥t¥~¡AY»Ýn¹ïIP¶i¦æ±ø¥ó¹LÂo¡A¤]¥i©ó¦¹³]©wÀɤ¤¡A³z¹Lקï IPADDR ªºÅÞ¿è§PÂ_¡A©Î¹ï include-range ªº begin & end¨Ó½Õ¾ã¹ïÀ³ªºIP½d³ò¡C
*½Ðª`·N¡A
קï threshd-configuration.xml¡A»Ý«±ÒªA°È³]©w¤~·|¥Í®Ä¡I
¬y¶q§iĵ¾÷¨î¨ì¦¹³]©w§¹¦¨¡ã
°Ñ¦Ò¸ê®Æ
Creating Threshold Alarms
♥¶¶¤l¦Ñ±Cªººô©ç¡A½Ð¦hÃö·Ó¡ã
If you don't like something, change it.
If you can't change it, change your attitude.
Don't complain!
|