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

Windows¦b¦w¸Ë¤Î±Ò¥ÎSNMP«á¡AResource Graphs¤w¥i¼´¨ìMemory/Disk¼Æ¾Ú¡Aø»s¬y¶q¹Ï¡C

Memory


Disk



¦Ó¨ä°Ñ·Óªº³]©w«h©w¸q¦bmib2.xml¤¤¡A¸ô®|¦p¤U¡C

/usr/share/opennms/etc/datacollection/mib2.xml

##### Diks & Memory ¥Îªº¬O¦P¤@²Õ #####
<group name="mib2-host-resources-storage" ifType="all">
    <mibObj oid=".1.3.6.1.2.1.25.2.3.1.2" instance="hrStorageIndex" alias="hrStorageType" type="string" />
    <mibObj oid=".1.3.6.1.2.1.25.2.3.1.3" instance="hrStorageIndex" alias="hrStorageDescr" type="string" />
    <mibObj oid=".1.3.6.1.2.1.25.2.3.1.4" instance="hrStorageIndex" alias="hrStorageAllocUnits" type="gauge" />
    <mibObj oid=".1.3.6.1.2.1.25.2.3.1.5" instance="hrStorageIndex" alias="hrStorageSize" type="gauge" />
    <mibObj oid=".1.3.6.1.2.1.25.2.3.1.6" instance="hrStorageIndex" alias="hrStorageUsed" type="gauge" />
</group>

¦³¤F³o¨Çoid©w¸q¡A¤S¯à¥H³o¨Ç¼Æ¾Úø»s¬y¶q¹Ï¡A
§Ú­Ì·íµM¤]¥i¥H¨Ï¥Î³o¨Ç¼Æ¾Ú¨Ó³]©w¬ÛÃöthresholdªº§iĵ¾÷¨î¡C


  • Memory & Diskªºthreshold³]©w
    ¦p¤W©Ò»¡WindowsªºMemory»PDisk¬O³z¹L¦P¤@­Ógroup¨Ó¨ú±o¡A¦Ó¨ä¶¡ªº®t§O¬O³z¹L hrStorageDescr ³o­Ó¦r¦ê´y­z¨Ó°Ï§O¡F
    §Ú­Ì¥i¥H³z¹Lsnmpwalkªº¬d¸ß¨ÓÅçÃÒ¦¹¨Æ¡C



    ¦ÓhrStorageªºthreshold¡A¦b¹w³]ªºthreshold group - hrstorage¤¤¡A¤w©w¸q¤F¤G²ÕhrStorageªºthreshold¥i¨Ñ°Ñ¦Ò©Îª½±µ®M¥Î¡A
    ¤@²Õ¬O¨Ï¥Î²v¶W¹L90%ªºÄµ¥Ü¡A¥t¤@²Õ¬O¬Û¹ï¦¨ªø²v¹F33%ªºÄµ¥Ü¡C



    ¥Ñ©óMemory¤ÎDisk¨S¦³¨Ï¥Î²vªºoid¡A©Ò¥H¦b¨Ï¥Î²vªº­pºâ¤W¡A³£¬O¥H ¨Ï¥Î¶q / Á`¶q ¨Ó­pºâ¨ú±o¡A¤½¦¡¦p¤U¡C
    hrStorageUsed / hrStorageSize * 100.0

    ·íµM¡A­Y§Ú­Ì»Ýª½±µ¥H¨Ï¥Î¶q¨Ó°µ§iĵ¡A¦Ó¤£¬O¥H¨Ï¥Î²v¨Ó§iĵ¡A´N¤£»Ý­n°µ³o¼Ëªº¦Ê¤À¤ñÂà´«¡C

    ¦bMemory»PDiskªº°Ï¤À¤W¡A«e­±¤w¸g»¡¤F¬O³z¹L hrStorageDescr ³o­Ó¦r¦ê´y­z¨Ó°Ï§O¡A
    ¥H¶¶¤lªºMemory¬°¨Ò¡A¨ä¦r¦ê­È¬° "Physical Memory"¡A­Y­n°w¹ïMemory¨Ó³]threshold¡A
    ¨º»ò´N¦b­nRegular Expression¤¤¿é¤J Physical Memory °µ¬°¹LÂo±ø¥ó¡C



    ­Y­n°»´úªº¥Ø¼Ð¬O¶¶¤lªºCºÐªÅ¶¡ªº¸Ü¡A«h­n¦bRegular Expression¤¤¿é¤J ^C:\\ Label: Serial Number 50921c69 °µ¬°¹LÂo±ø¥ó¡C




  • CPUªº°»´ú
    ¦³¨S¦³µo²{¨ì¥»¤å¤@¶}©l¡A°£¤F®i¥ÜMemory»PDiskªº¬y¶q¹Ï¥~¡A¨Ã¨S¦³¤@¨Ö®i¥ÜCPUªº¬y¶q¹Ï©O¡H
    ³o¬O¦]¬°OpenNMS¨t²Î¤¤ÁöµM¦³¥]¤FWindows CPU loadingªºoid¡A¦ý¨Ã¨S¦³¥[¤J¨ì¹w³]¦¬¶°ªº¶µ¥Ø¤§¤¤¡C

    Windows CPU loadingªºoid¬O .1.3.6.1.2.1.25.3.3.1.2¡A§O¦W¬° hrProcessorLoad¡F
    ¦¹oidÁöµM¦P¼Ë¥]§t¦bmib2.xmlªº¤º®e¤§¤¤¡A¦ý¨S¦³include¨ìsystemDef¤§¤¤¡A©Ò¥H¦b¹w³]±ø¥ó¤U¨Ã¤£·|¶i¦æCPU loadingªº¼Æ¾Ú¦¬¶°¡C
    <group name="mib2-host-resources-processor" ifType="all">
        <mibObj oid=".1.3.6.1.2.1.25.3.2.1.1" instance="hrDeviceEntry" alias="hrDeviceIndex" type="string" />
        <mibObj oid=".1.3.6.1.2.1.25.3.2.1.2" instance="hrDeviceEntry" alias="hrDeviceType" type="string" />
        <mibObj oid=".1.3.6.1.2.1.25.3.2.1.3" instance="hrDeviceEntry" alias="hrDeviceDescr" type="string" />
        <mibObj oid=".1.3.6.1.2.1.25.3.3.1.2" instance="hrDeviceEntry" alias="hrProcessorLoad" type="Gauge32" />
    </group>
    ...
    <systemDef name="Enterprise">
        <sysoidMask>.1.3.6.1.4.1.</sysoidMask>
        <collect>
            <includeGroup>mib2-interfaces</includeGroup>
            <includeGroup>mib2-tcp</includeGroup>
            <includeGroup>mib2-powerethernet</includeGroup>
        </collect>
    </systemDef>


    §Ú­Ì¥²»Ý§â mib2-host-resources-processor ³o­Ógroup¯Ç¤JsystemDef¤§¤¤¡A
    ³o¼ËOpenNMS¤~·|³z¹L³o­Ógroupùتºoid©w¸q¥h¼´¨úCPUªºloading¼Æ­È¡C
    <systemDef name="Enterprise">
        <sysoidMask>.1.3.6.1.4.1.</sysoidMask>
        <collect>
            <includeGroup>mib2-interfaces</includeGroup>
            <includeGroup>mib2-tcp</includeGroup>
            <includeGroup>mib2-powerethernet</includeGroup>
            <includeGroup>mib2-host-resources-processor</includeGroup>
        </collect>
    </systemDef>


    ³]©w§¹­«±ÒOpenNMSªA°È¤§«á¡AWindows Serverªºnode¤w¦h¤FHost Resources Device³o­Ó¶µ¥Ø¡A
    ¨ä¤¤ÁÙ¦³¤@­ÓUnknown Processor Type¡I



    ¦³¤F³o­Ó¦¬¶°Ãþ«¬¡AWindows ServerªºCPU loading¬y¶q¹Ï·íµM´N¥i¥H¶¶§Q²£¥Í~




    ¦Ü©ó¥»½gªº­«ÂIthresholdªº³]©w¡A¥Ñ©óCPU¨S¦³¹w³]ªº½d¥»¥i¥Î¡A
    ¦ÓCPUªºoid¬O¦b¸òMemory/Disk¤@¼Ë³£¬O¦bmib2.xml¤¤¡A©Ò¥H¶¶¤l¨M©w§âCPUªºthreshold·s¼W¦bmib2³o­Ógroup¤¤¡C



    CPU thresholdªº³]©w­«ÂI¦p¤U¡A
    Datasource ¿é¤J hrProcessorLoad
    Datasource type ¿ï¾Ü Host Resources Device
    Datasource label ¥i¿é¤J hrDeviceType©Î¯d¥Õ(¤Ï¥¿³o¥u¬O¤@­ÓÃѧO¦r¦ê)
    ¦ÓValue/Re-arm value¤ÎTrigger¼Æ¥Ø¡A¥i¨Ì»Ý­n¦Û¦æ³]©w¡C



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


    ¡ô´ú¸Õlab¤¤¡A·íCPU¨Ï¥Î²v¹F100%ªº³qª¾«H¡C


    ¥t¥~¾Ú»¡³o­Ó¾÷¨îµLªk¤À¿ë¦h®ÖCPUªº¦U§O¨Ï¥Î²v¡A
    ¥u­nCPU¤¤¡A¦³¥ô¦ó¤@­Ó¹F¼Ð¡A´N·|IJµothreshold¨Æ¥ó¡C
    ¤£¹L¶¶¤lªºlab¤¤¥u¦³¤À°t¤@ÁûCPUµ¹Windows server¨Ï¥Î¡A
    µLªk¹ï³o­Ó»¡ªk¶i¦æÅçÃÒ...

    ¦sºÃªºªB¤Í¡A¥i¥H§Q¥Î¦Û¤vªºÀô¹Ò´ú´ú¬Ý³Ì·Ç¡ã



¥H¤W°£¤FCPUªº°»´ú»Ý­n¦Û¦æ¼W¥[¥~¡A
WindowsªºMemory»PDiskªºthreshold³]©w¡A§Ú­Ì³£¥i¥H®³¨t²Î¹w³]ªºthreshold¨Ó°µ¼Ë¥»®M¥Î©Î­×§ï¡A
¤]¦p¦P¤W¤@½g Linux Resource Threshold ©Ò»¡¡A§Ú­Ì¥i¥H¨Ì»Ý¨D¨Ó«Ø¥ß¦Û¤vªºthreshold¡A
¤]¥i¥H¨Ì¦U¥D¾÷ªº©Ê½è¤£¦P¡A³z¹LIP¨Ó¶i¦æ¹ïÀ³ªº¹LÂo¡C
³o³¡¤À½Ð°Ñ¦Ò Linux Resource Threshold¡A¥»½g´N¤£¦A­«½ÆÂØ­z¡ã

Windowsªºthreshold³]©w¨ì¦¹§i¤@¬q¸¨¡ã


°Ñ¦Ò¸ê®Æ
Âø¶Ãªº¾Ç²ßµ§°O¥»



♥¶¶¤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-26, 22:47 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