Shunze ¾Ç¶é >¹q¸£¸ê°T¾Ç¨t >OpenNMS > ¡m¤­¡n³z¹LThreshold³]©wºô¥d¬y¶q§iĵ¾÷¨î «¢Åo¡AÁÙ¨S¦³µù¥U©ÎªÌµn¤J¡C½Ð§A[µù¥U|µn¤J]
« ¤W¤@½g¥DÃD ¤U¤@½g¥DÃD » Åã¥Ü¦¨¦C¦L¼Ò¦¡ | ¼W¥[¨ì§Úªº³Ì·R
µoªí·s¥DÃD µoªí¦^ÂÐ
§@ªÌ
¥DÃD
shunze
¤u¤Í§B§B


µù¥U¤é´Á: 2002 04
¨Ó¦Û: ¼é¦Á²×¤î¤§¦a
¤å³¹: 2380

shunze Â÷½u
¡m¤À¨É¡n³z¹LThreshold³]©wºô¥d¬y¶q§iĵ¾÷¨î¤Þ¥Î¦^ÂÐ ½s¿è/§R°£¤å³¹ ·j´M¥Ñ  µoªíªº¨ä¥L¤å³¹ ¦^³øµ¹ª©¥D IP ¦ì¸m ¦^¦¹­¶³Ì¤W¤è

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ªº´y­z¡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´y­z¡A
¤£¦Pport·|¦³¤£¦Pªº¦WºÙ´y­z 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



¦¹¥~¡A­Y§Ú­Ì·Q­nÅܧó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¥~¡A­Y»Ý­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!




2015-10-16, 11:08 shunze ªº­Ó¤H¸ê®Æ §â shunze ¥[¤J¦n¤Í¦Cªí µo°eEmailµ¹ shunze ÂsÄý shunze ªººô¯¸ MSN : shunze@gmail.com
  « ¤W¤@½g¥DÃD ¤U¤@½g¥DÃD »
µoªí·s¥DÃD µoªí¦^ÂÐ
¸õ¨ì:

Powered by: Burning Board 1.1.1 2001 WoltLab GbR