¡m¤À¨É¡n²Ä¤T¤èª«¥óªºResource Threshold | |
¦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¤Wz«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>
·íµMY±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©Ò¥Hn¿ï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¥un¦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·QnªºÄ²µo¨Æ¥ó¡A
³o¼Ë¬O§_²z·Q¦h¤F¡ã
·íµMYnºÊ±±CyberoamªºµwºÐ¤Î°O¾ÐÅé¨Ï¥Î²v¡A¥un¤ñ·Ó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!
|