免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1689 | 回复: 0
打印 上一主题 下一主题

mrtg监控squid状态不成功 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-09-01 14:56 |只看该作者 |倒序浏览
(1)我们需要修改squid
vi /etc/squid/squid.conf
acl snmppublic snmp_community public (设置snmp监控的共同体为public)
snmp_port 3401(设置snmp监控端口)
snmp_access allow snmppublic all(允许所有的计算机访问snmppublic)
然后从新启动squid /etc/rc.d/init.d/squid restart
(2)把/etc/squid/mib.txt 复制到/etc/mrtg/squid.mib
cp /etc/squid/mib.txt /etc/mrtg/squid.mib
(3)然后修改/etc/mrtg/mrtg.cfg
加入LoadMIBs: /etc/mrtg/squid.mib
(4)在/etc/mrtg/mrtg.cfg加入如下
Target[proxy-hit]: cacheHttpHits&cacheServerRequests:public@x.x.x.x:3401(x.x.x.x为你机器的IP地址)
MaxBytes[proxy-hit]: 100000
Title[proxy-hit]: HTTP Hits
PageTop[proxy-hit]: <H1>proxy Cache Statistics: HTTP Hits/Requests</H1>
<TABLE>
<TR><TD>System:</TD><TD>redhat.grandunion.com.cn</TD></TR>
<TR><TD>Maintainer:</TD><TD>Serassio Guido</TD></TR>
<TR><TD>Description:</TD><TD>Squid Proxy server</TD></TR>
</TABLE>
Suppress[proxy-hit]: y
LegendI[proxy-hit]: HTTP hits
LegendO[proxy-hit]: HTTP requests
Legend1[proxy-hit]: HTTP hits
Legend2[proxy-hit]: HTTP requests
YLegend[proxy-hit]: perminute
ShortLegend[proxy-hit]: req/min
Options[proxy-hit]: nopercent, perminute, dorelpercent, unknaszero

Target[proxy-srvkbinout]: cacheServerInKb&cacheServerOutKb:public@x.x.x.x:3401(x.x.x.x为你机器的IP地址)
MaxBytes[proxy-srvkbinout]: 2000(这儿为你的真实网络带宽xxxK)
Title[proxy-srvkbinout]: Cache Server Traffic In/Out
PageTop[proxy-srvkbinout]: <H1>Cache Statistics: Server traffic volume (In/Out)</H1>
<TABLE>
<TR><TD>System:</TD><TD>redhat.grandunion.com.cn</TD></TR>
<TR><TD>Maintainer:</TD><TD>Serassio Guido</TD></TR>
<TR><TD>Description:</TD><TD>Squid Proxy server</TD></TR>
</TABLE>
Suppress[proxy-srvkbinout]: y
LegendI[proxy-srvkbinout]: Traffic In
LegendO[proxy-srvkbinout]: Traffic Out
Legend1[proxy-srvkbinout]: Traffic In
Legend2[proxy-srvkbinout]: Traffic Out
YLegend[proxy-srvkbinout]: per minute
ShortLegend[proxy-srvkbinout]: b/min
kMG[proxy-srvkbinout]: k,M,G,T
kilo[proxy-srvkbinout]: 1024
Options[proxy-srvkbinout]: nopercent, perminute, unknaszero
保存文件,并运行mrtg mrtg.cfg
然后出现了下面的报错信息

ossim: /var/www/mrtg/192.168.10.110# env LANG=C /usr/bin/mrtg  /var/www/mrtg/192.168.10.110/192.168.10.110
Unknown SNMP var cacheUptime
at /usr/bin/mrtg line 2207
Unknown SNMP var cacheSoftware
at /usr/bin/mrtg line 2207
Unknown SNMP var cacheVersionId
at /usr/bin/mrtg line 2207
Use of uninitialized value $ret[-2] in concatenation (.) or string at /usr/bin/mrtg line 2226.
Use of uninitialized value $ret[-1] in concatenation (.) or string at /usr/bin/mrtg line 2226.

请大虾帮忙解决一下
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP