[问题] 请教:安装mrtg时报错

为当前最终发行版之前的所有版本提供支持
回复
gwz
帖子: 4
注册时间: 2008-08-06 8:49
送出感谢: 0
接收感谢: 0

[问题] 请教:安装mrtg时报错

#1

帖子 gwz » 2008-08-27 8:23

我用如下方法安装mrtg

网络流量监视[默认5分钟采集一次]

切换到超级用户:
sudo -sH

安装软件:
apt-get install apache2
apt-get install mrtg
apt-get install snmpd

编辑snmpd:
vim /etc/snmp/snmpd.conf

查找到类似的行,修改为如下所示:(仅仅修改屏蔽或放开)
# sec.name source community
# com2sec paranoid default public # kommentieren
com2sec readonly default public # <- auskommentieren
#com2sec readwrite default private

重启snmpd服务:
/etc/init.d/snmpd restart

重新生成mrtg的配置文件:
cfgmaker public@localhost > /etc/mrtg.cfg

(注意)如果仅仅监视一个IP地址采用如下命令:
cfgmaker public@192.168.0.1 >> /etc/mrtg.cfg

生成mrtg的主页:
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

访问:
http://localhost/mrtg/



在重新生成配置文件时出现如下错误(cfgmaker public@localhost > /etc/mrtg.cfg ):
root@ubuntu:~# cfgmaker public@localhost > /etc/mrtg.cfg
SNMP Error:
no response received
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
community: "public"
request ID: 636641467
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/share/perl5/SNMP_util.pm line 627
SNMPWALK Problem for 1.3.6.1.2.1.1 on public@localhost::::::v4only
at /usr/bin/cfgmaker line 921
WARNING: Skipping public@localhost: as no info could be retrieved
回复

回到 “老旧版本支持”