您的位置:首页 > 移动开发 > IOS开发

ngios 流量监控文档

2013-09-10 11:36 169 查看
ngios流量监控文档以下的文档是在需要被监控的机器上安装,因为流量需要从被监控机器上抓取。所需软件net-snmpnet-snmp-utilsnet-snmp-libs所需脚本check_traffic.sh可从下面链接下载http://www.itnms.net/discuz/viewthread.php?tid=767&extra=pageD1&page=11.查看系统是否安装rpm–qa|grepsnmp,如没有上传以上包,再上传check_traffic.sh脚本至$nagios/libexec/,并更改traffic脚本权限为7552.未安装时下载上面的snmp的rpm包我用的为net-snmp-5.1.2-13.el4.i386net-snmp-utils-5.1.2-13.el4.i386net-snmp-libs-5.1.2-13.el43.vi/etc/snmp/snmp.confa)更改#sec.namesourcecommunitycom2secnotConfigUserdefaultpublic为#sec.namesourcecommunitycom2secnotConfigUserlocalhost(源IP)nagios(访问密码)注:上面提到的源IP,指的是允许哪些IP来抓取流量,如果要写成网段,例如:192.168.0.0/24。代表允许192.168.0.0/24b)更改accessnotConfigGroup""anynoauthexactsystemviewnonenone为accessnotConfigGroup""anynoauthexactmib2nonenonec)去掉该的##viewmib2included.iso.org.dod.internet.mgmt.mib-2fcd)启动snmp/etc/init.d/snmpdstart检查启动情况Netstat–na|grep161测试snmpsnmpwalk-v1-cnagioslocalhostsystemTraffic脚本测试如果不知道网卡/usr/local/nagios/libexec//check_traffic.sh-V2c-Cnagios-Hlocalhost–L命令列出/usr/local/nagios/libexec//check_traffic.sh-V2c-Cnagios-Hlocalhost-I2-w12,30-c15,35-M–b用原始的check_traffic.sh无法得到结果,提示错误如下:OOPS.WegetavaluebiggerthanifSpeedhere.Somethingiswrong.Maybeacheckfrom32bitto64bittransfer,oranyothererrorhere.解决方法:注释掉相关语句:if[$In-gt$ifSpeed-o$Out-gt$ifSpeed];if[$In-gt$ifSpeed-o$Out-gt$ifSpeed];
就OK了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息