mrtg 在红旗 4。0上无法显示流量的问题,请各位网友支持
我参考了很多朋友的帖子,预先安装了APACHE(但我不知道MRTG对APACHE有什么特殊要求,按标准安装的,没有改任何地方)。
METG是安装的2.10.13,安装都正常。默认安装的是NET.SNMP
SNMPD.CONF和MRTG.CFG都参考别人的帖子改了,配置中没发现有不对的错误提示,但在HTTP浏览器里却只能显示MRTG的界面,但没有绿色的流量显示。不知道为什么不能看流量。
配置文件如下:
First, map the community name "public" into a "security name"
# sec.name source community
com2sec notConfigUser default public
####
# Second, map the security name into a group name:
# groupName securityModel securityName
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
####
# Third, create a view for us to let the group have rights to:
# name incl/excl subtree mask(optional)
view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
# Finally, grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write notif
access notConfigGroup "" any noauth exact mib2 none none在SYSLOCATION 前又加了一句rocommunity public
下面是MRTG.CFG配置文件,基本全是自动生成的,只改了
# Created by
# /usr/local/mrtg/bin/cfgmaker --output=/etc/mrtg.cfg public@10.8.145.34
### Global Config Options
# for UNIX
# WorkDir: /home/http/mrtg
# or for NT
# WorkDir: c:\mrtgdata
### Global Defaults
# to get bits instead of bytes and graphs growing to the right
Options[_]: growright, bits
WorkDir: /var/www/html/mrtg1
EnableIPv6: no
######################################################################
# System: localhost.localdomain
# Description: Linux localhost.localdomain 2.4.20-8smp #1 SMP 三 7月 23 18:58:25 CST 2003 i686
# Contact: Root <root@localhost>; (configure /etc/snmp/snmp.local.conf)
# Location: 10.8.145.34 (edit /etc/snmp/snmpd.conf)
######################################################################
### Interface 1 >;>; Descr: 'lo' | Name: '' | Ip: '127.0.0.1' | Eth: '' ###
### The following interface is commented out because:
### * it is a Software Loopback interface
#
# Target[10.8.145.34_1]: 1:public@10.8.145.34:
# SetEnv[10.8.145.34_1]: MRTG_INT_IP="127.0.0.1" MRTG_INT_DESCR="lo"
# MaxBytes[10.8.145.34_1]: 1250000
# Title[10.8.145.34_1]: Traffic Analysis for 1 -- localhost.localdomain
# PageTop[10.8.145.34_1]: <H1>;Traffic Analysis for 1 -- localhost.localdomain</H1>;
# <TABLE>;
# <TR>;<TD>;System:</TD>; <TD>;localhost.localdomain in 10.8.145.34 (edit /etc/snmp/snmpd.conf)</TD>;</TR>;
# <TR>;<TD>;Maintainer:</TD>; <TD>;Root &root@localhost& (configure /etc/snmp/snmp.local.conf)</TD>;</TR>;
# <TR>;<TD>;Description:</TD>;<TD>;lo </TD>;</TR>;
# <TR>;<TD>;ifType:</TD>; <TD>;softwareLoopback (24)</TD>;</TR>;
# <TR>;<TD>;ifName:</TD>; <TD>;</TD>;</TR>;
# <TR>;<TD>;Max Speed:</TD>; <TD>;1250.0 kBytes/s</TD>;</TR>;
# <TR>;<TD>;Ip:</TD>; <TD>;127.0.0.1 (localhost.localdomain)</TD>;</TR>;
# </TABLE>;
### Interface 2 >;>; Descr: 'eth0' | Name: '' | Ip: '10.8.145.34' | Eth: '00-0c-76-6a-f3-11' ###
Target[10.8.145.34_2]: 2:public@10.8.145.34:
SetEnv[10.8.145.34_2]: MRTG_INT_IP="10.8.145.34" MRTG_INT_DESCR="eth0"
MaxBytes[10.8.145.34_2]: 1250000
Title[10.8.145.34_2]: Traffic Analysis for 2 -- localhost.localdomain
PageTop[10.8.145.34_2]: <H1>;Traffic Analysis for 2 -- localhost.localdomain</H1>;
<TABLE>;
<TR>;<TD>;System:</TD>; <TD>;localhost.localdomain in 10.8.145.34 (edit /etc/snmp/snmpd.conf)</TD>;</TR>;
<TR>;<TD>;Maintainer:</TD>; <TD>;Root &root@localhost& (configure /etc/snmp/snmp.local.conf)</TD>;</TR>;
<TR>;<TD>;Description:</TD>;<TD>;eth0 </TD>;</TR>;
<TR>;<TD>;ifType:</TD>; <TD>;ethernetCsmacd (6)</TD>;</TR>;
<TR>;<TD>;ifName:</TD>; <TD>;</TD>;</TR>;
<TR>;<TD>;Max Speed:</TD>; <TD>;1250.0 kBytes/s</TD>;</TR>;
<TR>;<TD>;Ip:</TD>; <TD>;10.8.145.34 ()</TD>;</TR>;
</TABLE>;
### Interface 3 >;>; Descr: 'eth1' | Name: '' | Ip: '10.8.145.35' | Eth: '00-0c-76-6a-f3-10' ###
### The following interface is commented out because:
### * it is operationally DOWN
#
# Target[10.8.145.34_3]: 3:public@10.8.145.34:
# SetEnv[10.8.145.34_3]: MRTG_INT_IP="10.8.145.35" MRTG_INT_DESCR="eth1"
# MaxBytes[10.8.145.34_3]: 1250000
# Title[10.8.145.34_3]: Traffic Analysis for 3 -- localhost.localdomain
# PageTop[10.8.145.34_3]: <H1>;Traffic Analysis for 3 -- localhost.localdomain</H1>;
# <TABLE>;
# <TR>;<TD>;System:</TD>; <TD>;localhost.localdomain in 10.8.145.34 (edit /etc/snmp/snmpd.conf)</TD>;</TR>;
# <TR>;<TD>;Maintainer:</TD>; <TD>;Root &root@localhost& (configure /etc/snmp/snmp.local.conf)</TD>;</TR>;
# <TR>;<TD>;Description:</TD>;<TD>;eth1 </TD>;</TR>;
# <TR>;<TD>;ifType:</TD>; <TD>;ethernetCsmacd (6)</TD>;</TR>;
# <TR>;<TD>;ifName:</TD>; <TD>;</TD>;</TR>;
# <TR>;<TD>;Max Speed:</TD>; <TD>;1250.0 kBytes/s</TD>;</TR>;
# <TR>;<TD>;Ip:</TD>; <TD>;10.8.145.35 ()</TD>;</TR>;
# </TABLE>;
能帮我看看错在哪儿吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有没有在/etc/crontab文件配置定期(比如每5分钟)执行?
有没有在/etc/crontab文件配置定期(比如每5分钟)执行?
要么你手工执行试试。
我用CRONTAB -E 修改过了啊。
我在创建mrtg。cfg文件时能看到屏幕上滚过探测到我的2款网卡的信息,包括IP,MAC都是对的,也没看到有错误,但我打开CFG文件时看到 SNMPv1_Session (remote host: "192.168.110.1" [192.168.110.1].161)
community: "mrtg"
request ID: 2048428380
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1) 这样的信息,大意是说这个网卡不能如何如何
我看这个意思是说SNMP探测没起作用啊。
可是该起的服务我全起了,防活墙也关了。又不报告什么错误,创建CFG时遇到了说 ENV C LANG的问题,我用 env LANG=C /usr/local/mrtg/bin/mrtg /var/www/html/mrtg/mrtg。cfg看不到错误了。
SNMP没起作用原因是什么呢?我是参考http://www.chinaunix.net/jh/4/303650.html的方式做的,但有一些疑惑点,不知道COMMUNITY该设置成 PUBLIC还是MRTG。但我在SNMPD。CONF里是统一的,是用MRTG, 创建CFG时用了MRTG·。。。,没看到报告错误,但VI 打开CFG能看到什么 TIME OUT的错。
怎么回事??很着急啊,是客户那边的机器需要去查故障所以才现学的这个。我现在是在 RED HAT 9上试的,跟红旗4结果一样,搞不清楚!!
求大家帮我!~