LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1728|回复: 3

请分析一下,MRTG,这是什么问题?

[复制链接]
发表于 2003-10-29 20:24:40 | 显示全部楼层 |阅读模式
# cfgmaker --global "WorkDir: /var/www/html/mrtg" --global "Options[_]: growright,bits" --ifref=ip --output /etc/mrtg.cfg public@10.28.176.21

--base: Get Device Info on public@10.28.176.21:
SNMP Error:
no response received
SNMPv1_Session (remote host: "10.28.176.21" [10.28.176.21].161)
                  community: "public"
                 request ID: 840749726
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 450
SNMPGET Problem for sysDescr sysContact sysName sysLocation sysObjectID on public@10.28.176.21:
at /usr/bin/cfgmaker line 657
--base: Vendor Id:
--base: Populating confcache
--snpo: Skipping ifDescr scanning because public@10.28.176.21: does not seem to support it
--snpo: Skipping ipAdEntIfIndex scanning because public@10.28.176.21: does not seem to support it
--snpo: Skipping ifName scanning because public@10.28.176.21: does not seem to support it
--snpo: Skipping ifType scanning because public@10.28.176.21: does not seem to support it
--snpo: Skipping ifPhysAddress scanning because public@10.28.176.21: does not seem to support it
--base: Get Interface Info
--base: Walking ifIndex
SNMP Error:
no response received
SNMPv1_Session (remote host: "10.28.176.21" [10.28.176.21].161)
                  community: "public"
                 request ID: 840749732
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 540
SNMPWALK Problem for 1.3.6.1.2.1.2.2.1.1 on public@10.28.176.21:
at /usr/bin/cfgmaker line 107
--base: Walking ifType
SNMP Error:
no response received
SNMPv1_Session (remote host: "10.28.176.21" [10.28.176.21].161)
                  community: "public"
                 request ID: 840749733
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 540
SNMPWALK Problem for 1.3.6.1.2.1.2.2.1.3 on public@10.28.176.21:
at /usr/bin/cfgmaker line 107
--base: Walking ifSpeed
SNMP Error:
no response received
SNMPv1_Session (remote host: "10.28.176.21" [10.28.176.21].161)
                  community: "public"
                 request ID: 840749734
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 540
SNMPWALK Problem for 1.3.6.1.2.1.2.2.1.5 on public@10.28.176.21:
at /usr/bin/cfgmaker line 107
--base: Walking ifAdminStatus
SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 1 (OID: 1.3.6.1.2.1.2.2.1.7)
SNMPv1_Session (remote host: "10.28.176.21" [10.28.176.21].161)
                  community: "public"
                 request ID: 840749735
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 540
SNMP Error:
no response received
SNMPv1_Session (remote host: "10.28.176.21" [10.28.176.21].161)
                  community: "public"
                 request ID: 840749735
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 540
SNMPWALK Problem for 1.3.6.1.2.1.2.2.1.7 on public@10.28.176.21:
at /usr/bin/cfgmaker line 107
--base: Walking ifOperStatus
SNMP Error:
no response received
SNMPv1_Session (remote host: "10.28.176.21" [10.28.176.21].161)
                  community: "public"
                 request ID: 840749736
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
at /usr/bin/../lib/mrtg2/SNMP_util.pm line 540
SNMPWALK Problem for 1.3.6.1.2.1.2.2.1.8 on public@10.28.176.21:
at /usr/bin/cfgmaker line 107
--base: Writing /etc/mrtg.cfg
发表于 2003-10-29 20:33:54 | 显示全部楼层
这个应该是你的snmp.conf的配置问题,
我也遇到过。
但是装了系统自带的rpm的net-snmp后,就没问题了。
但是我解释不了,初步给我的感觉就是snmp的版本问题。
mrtg支持到v2c,但是高级版本的net-snmp支持v3。
所以我认为是这个问题造成的。
 楼主| 发表于 2003-10-29 20:40:51 | 显示全部楼层
我把系统自己带的NET-SNMP删除了,安装的是UCD-SNMP.现在改回去,果然就行了。

但是:

# indexmaker --output=/var/www/html/mrtg/index.html  --title=Firewall /etc/mrtg.cfg
Can't locate package $VERSION for @MRTG_lib::ISA at /usr/bin/indexmaker line 49
        main::BEGIN() called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
        eval {...} called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
 楼主| 发表于 2003-10-29 21:17:29 | 显示全部楼层

找到答案了

RedHat Version 9.0 / 8.0 and Indexmaker
RedHat versions 8 and 9 give an error like this when running indexmaker.



[root@bigboy mrtg]# indexmaker --output=index.html /etc/mrtg/localhost.cfg
Can't locate package $VERSION for @MRTG_lib::ISA at /usr/bin/indexmaker line 49
main::BEGIN() called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
eval {...} called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
[root@bigboy mrtg]#



This is caused by an incompatibility between MRTG and PERL 5.8 which MRTG uses to generate files. The MRTG site claims this was fixed in version 2.9.22, but this version of MRTG seems to fail under RedHat.

The fix is simple:

·         Edit the file /usr/lib/mrtg2/MRTG_lib.pm

·         Replace the line:

@ISA = qw(Exporter $VERSION);

with

@ISA = qw(Exporter);

·         Run indexmaker again.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表