相關 OID
1.3.6.1.4.1.12356.101.4.1.3 : CPU使用率,單位 %
1.3.6.1.4.1.12356.101.4.1.4 : 記憶體使用率,單位 %

首先使用 snmpwalk 工具測試是否可以正常抓到數字
# snmpwalk -v2c -c public 10.1.1.254 1.3.6.1.4.1.12356.101.4.1.3
SNMPv2-SMI::enterprises.12356.101.4.1.3.0 = Gauge32: 0

# snmpwalk -v2c -c public 10.1.1.254 1.3.6.1.4.1.12356.101.4.1.4
SNMPv2-SMI::enterprises.12356.101.4.1.4.0 = Gauge32: 33

編輯 mrtg.cfg

# cpu
Target[CPU]: .1.3.6.1.4.1.12356.101.4.1.3.0&.1.3.6.1.4.1.12356.101.4.1.3.0:public@10.1.1.254
Title[CPU]: Procesor Usage
PageTop[CPU]: <h1>Procesor Usage</h1>
Options[CPU]: gauge, growright, nopercent
MaxBytes[CPU]: 100
YLegend[CPU]: pourcent
ShortLegend[CPU]: %
LegendI[CPU]: CPU usage
LegendO[CPU]: CPU usage
Legend1[CPU]: Total CPU Used
Legend2[CPU]: Total CPU Used

# Ram
Target[Ram]: .1.3.6.1.4.1.12356.101.4.1.4.0&.1.3.6.1.4.1.12356.101.4.1.4.0:public@10.1.1.254
Title[Ram]: Memory Usage
PageTop[Ram]: <h1>Memory Usage</h1>
Options[Ram]: gauge, growright, nopercent
MaxBytes[Ram]: 100
YLegend[Ram]: pourcent
ShortLegend[Ram]: %
LegendI[Ram]: Ram usage
LegendO[Ram]: Ram usage
Legend1[Ram]: Total Ram Used
Legend2[Ram]: Total Ram Used
 

arrow
arrow
    文章標籤
    fortigate mrtg snmp
    全站熱搜

    helloworld 發表在 痞客邦 留言(0) 人氣()