配置MRTG时出现的问题
配置文件是
mrtg.cfg:
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
WorkDir: /usr/tomcat/webapps/ROOT/mrtg/cpu_usr
Target[kontor.cpu]: ssCpuRawUser.0&ssCpuRawIdle.0:public@192.168.0.98
RouterUptime[kontor.cpu]: public@192.168.0.98
MaxBytes[kontor.cpu]: 100
Title[kontor.cpu]: CPU LOAD
PageTop[kontor.cpu]: <H1>User CPU Load %</H1>
Unscaled[kontor.cpu]: ymwd
ShortLegend[kontor.cpu]: %
YLegend[kontor.cpu]: CPU Utilization
Legend1[kontor.cpu]: User CPU in % (Load)
Legend2[kontor.cpu]: Idle CPU in % (Load)
Legend3[kontor.cpu]:
Legend4[kontor.cpu]:
LegendI[kontor.cpu]: User
LegendO[kontor.cpu]: Idle
Options[kontor.cpu]: growright,nopercent
抛出的错误
SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 2 (OID: 1.3.6.1.4.1.2021.11.53.0)
SNMPv1_Session (remote host: "192.168.0.98" [192.168.0.98].161)
community: "public"
request ID: 1045469843
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 458
SNMPGET Problem for ssCpuRawUser.0 ssCpuRawIdle.0 sysUptime sysName on public@19
2.168.0.98
at /usr/bin/mrtg line 1678
ERROR: Target[kontor.cpu][_IN_] ' $$target[0]{$mode} ' did not eval into defined
data
ERROR: Target[kontor.cpu][_OUT_] ' $$target[0]{$mode} ' did not eval into define
d data
WARNING: Skipping Update of kontor.cpu, inlast is not defined
WARNING: Skipping Update of kontor.cpu, outlast is not defined
因为是刚刚接触LINUX,所以不是很熟,我觉得好像是找不到ssCpuRawUser.0
和ssCpuRawIdle.0这两个名字。
但是在mrtg.cfg中的第一句是
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
但是,在UCD-SNMP-MIB.txt中可以找到ssCpuRawUser和ssCpuRawIdle的定义,
路径也应该没有问题。
如果谁比较熟悉的话,希望能给些提示。
谢谢