Shunze ¾Ç¶é >¹q¸£¸ê°T¾Ç¨t >OpenNMS > ¡m¤Q¤T¡n²Ä¤T¤èª«¥óªºResource Threshold «¢Å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²Ä¤T¤èª«¥óªºResource Threshold¤Þ¥Î¦^ÂÐ ½s¿è/§R°£¤å³¹ ·j´M¥Ñ  µoªíªº¨ä¥L¤å³¹ ¦^³øµ¹ª©¥D IP ¦ì¸m ¦^¦¹­¶³Ì¤W¤è

¦b°µ§¹Linux¤ÎWindowsªºresource threshold«á¡A
ÁÙ°O¤£°O±o¶¶¤l¦b ²Ä¤C½g ªº®É­Ô¡A³]©w¹L²Ä¤T¤èª«¥óªºnode-level data collect¡H

¦pªG²Ä¤T¤èª«¥ó¦b¶×¤JMIB«á¡A´N¯à³z¹LOpenNMS¦¬¶°¸Óª«¥óªº¸ê®Æ¡A¨Ã¥Bø»s¦¨¬y¶q¹Ï¡A
¨º»ò¬O§_¤]¥i¥HÂǦ¹¼Æ¾Ú³]©w²Ä¤T¤èª«¥óªºresource threshold¡H

³o³¡¤À·íµM¬O¥i¥Hªº¡ã
¶¶¤l¦P¼Ë¥H«³·ç¥N²zªº¨¾¤õÀðCyberoam¬°¨Ò¡A¥Ü½d¦p¦ó¶i¦æ²Ä¤T¤èª«¥óªºresource threshold³]©w¡C


°Ñ¦Ò ²Ä¤C½g ªº¤º®e¶×¤JCyberoamªºMIB«á¡AOpenNMSªºdatacollection¸ê®Æ§¨¡A·|¦h¥XCyberoamªºMIB¸ê®Æµ²ºc¡A¨ä¸ô®|¦p¤U¡C

/usr/share/opennms/etc/datacollection/CYBEROAM-MIB.xml


­Y§Ú­Ì¦³§âcpuStatus¡BdiskStatus¡BmemoryStatus¤ÎmailHitsµ¥group¥[¤JsystemDef¡A
¨º»ònode-levelªºResource Graphs´N¯à°÷¼´¨ú³o¨Ç¼Æ¾Ú¨Ãø»s¦¨¹Ï¡C
<group name="cpuStatus" ifType="ignore">
    <mibObj oid=".1.3.6.1.4.1.21067.2.1.2.2.1" instance="0" alias="cpuPercentUsage" type="integer32"/>
</group>
<group name="diskStatus" ifType="ignore">
    <mibObj oid=".1.3.6.1.4.1.21067.2.1.2.3.1" instance="0" alias="diskCapacity" type="gauge32"/>
    <mibObj oid=".1.3.6.1.4.1.21067.2.1.2.3.2" instance="0" alias="diskPercentUsage" type="gauge32"/>
</group>
<group name="memoryStatus" ifType="ignore">
    <mibObj oid=".1.3.6.1.4.1.21067.2.1.2.4.1" instance="0" alias="memoryCapacity" type="gauge32"/>
    <mibObj oid=".1.3.6.1.4.1.21067.2.1.2.4.2" instance="0" alias="memoryPercentUsage" type="gauge32"/>
    <mibObj oid=".1.3.6.1.4.1.21067.2.1.2.4.3" instance="0" alias="swapCapacity" type="gauge32"/>
    <mibObj oid=".1.3.6.1.4.1.21067.2.1.2.4.4" instance="0" alias="swapPercentUsage" type="gauge32"/>
</group>
<group name="mailHits" ifType="ignore">
    <mibObj oid=".1.3.6.1.4.1.21067.2.1.2.9.1" instance="0" alias="pop3Hits" type="counter64"/>
    <mibObj oid=".1.3.6.1.4.1.21067.2.1.2.9.2" instance="0" alias="imapHits" type="counter64"/>
    <mibObj oid=".1.3.6.1.4.1.21067.2.1.2.9.3" instance="0" alias="smtpHits" type="counter64"/>
</group>
...
<systemDef name="Cyberoam Firewall">
    <sysoidMask>.1.3.6.1.4.1.21067.2</sysoidMask>
    <collect>
        <includeGroup>cpuStatus</includeGroup>
        <includeGroup>diskStatus</includeGroup>
        <includeGroup>memoryStatus</includeGroup>
        <includeGroup>mailHits</includeGroup>
    </collect>
</systemDef>





¦b¤W­z«e¸m§@·~§¹¦¨«á¡A±µµÛ§Ú­Ì´N¥i¥H¶}©lµÛ¤â³]©wCyberoamªºthreshold¡C

¥Ñ©óCyberoam¬O¤@­Ó·sª«¥ó¡A¨Ã¤£¾A¥Î©óOpenNMS¤º«Ø7­Ógroup¤¤ªº¥ô¦ó¤@­Ó¡A©Ò¥H´N¨Ó«Ø¤@­Ó¥þ·sªºgroupµ¹Cyberoam¨Ó¥Î§a¡ã
(¤]¸Ó¬O®É­Ô¾Ç¤@¤U¦p¦ó«Ø¥ß·sªºthreshold group¤F...)

OpenNMSªºthreshold group¦b«Ø¥ß®É¡A¤À¦¨¨â­Ó³¡¤À¡A
²Ä¤@­Ó¬Othreshd-configuration.xml¡A¦ì¦b¥H¤U¸ô®|¤¤¡C
/usr/share/opennms/etc/threshd-configuration.xml

§Ú­Ì¦b¸ÓÀɮפ¤¡A·s¼W¥H¤U¤º®eµ¹Cyberoam¨Ó¨Ï¥Î¡C
<package name="Cyberoam">
    <filter>IPADDR != '0.0.0.0' & nodeSysOID LIKE '.1.3.6.1.4.1.21067.2%'</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="Cyberoam"/>
    </service>
</package>

¡ô¦³¨S¦³µo²{¶¶¤l¤ñ·Ó¨ä¥¦½d¨Ò¡A¥[¤W¤FCyberoamªºOID .1.3.6.1.4.1.21067.2 ¨Ó¶i¦æª«¥óªº±ø¥ó¹LÂo¡ã


²Ä¤G­Ó³¡¤À¬Othresholds.xml¡A¦ì¦b¥H¤U¸ô®|¤¤¡C
/usr/share/opennms/etc/thresholds.xml

¦b³oùاڭ̥u¥[¤F¤@­ÓCyberoamªºªÅ´ßµ¹Cyberoam¥Î¡C
<group name="Cyberoam" rrdRepository="/var/lib/opennms/rrd/snmp/">
</group>

·íµM­Y±z«Ü¼ô¨ä¤¤ªº³]©w¡A±z¤]¥i¥Hª½±µ¦b¸Ó´ß¼h¤¤§¹¦¨±z©Ò¦³²Ó¶µ³]©w¡A¤@¤Á¥þ¾Ì±z­Ó¤H¯à¤O¡ã


¥H¤W¨â­Ó³¡¤À³]©w¦n«á¡A­«±ÒOpenNMSªA°È¡A³o®É·s¼Wªºthreshold group´N·|¥X²{¤F¡I



ÂI¤J³o­Ógroup¡A¨Ó·s¼W¤@­Óthreshold¨Æ¥ó§a¡ã



¶¶¤l¥H°»´úCyberoam CPUªºloading°µ¥Ü½d¡A
¦bDatasource Äæ¦ì¿é¤J cpuPercentUsage¡A¹ïÀ³¨ìCyberoam mib¤¤cpuStatus groupªºalias¦WºÙ¡F
Datasource type ¿ï¾Ü Node¡A¦]¬°mib¤¤ cpuStatusªºinstance¬°0¡A¹ïÀ³¸ê®Æ¥X²{¦bNode¤§¤¤¡A©Ò¥H­n¿ïNode¡F
Datasource label ¯d¥Õ¡F
¦Ó Value/Re-arm value ¤Î Trigger ¼Æ¥Ø¡A¥i¨Ì»Ý­n¦Û¦æ³]©w¡C



¦p¤W¹Ï©Ò¥Ü¡A³o¼Ë´N·|«Ø¥ß¤@­Ó·íCPU¨Ï¥Î²v¶W¹L50%®É¡A´N·|IJµoªºthreshold¡F
¦Ó·íCPU¨Ï¥Î²v±¼¦^30%¥H¤U¡A´N·|¨ú®ø¸Ó¨Æ¥ó¡ã

­n´ú¸Õ³o­ÓCPUªºthreshold¬O§_¦³®Ä¨ä¹ê«Ü²³æ¡A
¥Ñ©óCyberoamªº³øªíiView¬O­Ó·¥¯Ó¸ê·½ªºªF¦è¡A©Ò¥H¥u­n¦bCyberoam¤W¦h¶}´X­ÓiView¡ACPU¦ÛµM´N·|½Ä¨ì100%¡C

5¤ÀÄÁ¤º¡AºÞ²z­ûªºemail´N·|¦¬¨ì¸ÓthresholdªºÄµ¥Ü³qª¾¤F¡ã



¶¶¤l¤§«e¦b´úCyberoamªº CPU high usage trap event ®É¡A
§â­ì¼t¨º­Ó­n ³sÄò25¤ÀÄÁCPU loading³£·|¶W¹L95% ¤~·|IJµosnmp trapªº¥\¯à°áªº­n¦º...
¼K¼K¡A²{¦b´N¤£¥Î¾aCybroam­ì¼tªºtrap event¤F¡A
¶¶¤l¦Û¤v³z¹Lthreshold´N¥i¥H¶¶¤ß©Ò±ýªº©w¸q¦Û¤v·Q­nªºÄ²µo¨Æ¥ó¡A
³o¼Ë¬O§_²z·Q¦h¤F¡ã



·íµM­Y­nºÊ±±CyberoamªºµwºÐ¤Î°O¾ÐÅé¨Ï¥Î²v¡A¥u­n¤ñ·ÓCPUªº°»´ú¨Ó³]©w¡F
§âDatasource§ï¬°¹ïÀ³¶µ¥Ø¦WºÙªºalias§Y¥i¡C

²Ä¤T¤èª«¥óªºresource threshold³]©w¨ì¦¹§i¤@¬q¸¨¡ã



♥¶¶¤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-12-27, 01:34 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