關于在CentOS下MRTG的正確安裝方法
作者:佚名
關于在CentOS下MRTG的正確安裝方法:MRTG(Multi Router Traffic Grapher)是一個監控網絡鏈路流量負載的工具軟件,通過snmp協議得到設備的流量信息。本文講述的是:關于在CentOS下MRTG的正確安裝方法
關于在CentOS下MRTG的正確安裝方法
安裝方法如下:
- yum install net-snmp net-snmp-utils mrtg
恩,安裝好了。
接著生成配置文件:
==========================================
- vim /etc/snmp/snmpd.conf
把第89行前面的注釋符號#去掉,變成
- view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
在62行進行修改:將
- access notConfigGroup “” any noauth exact systemview none none
改為
- access notConfigGroup “” any noauth exact mib2 none none
===============================================
- /usr/bin/cfgmaker public@localhost > /etc/mrtg/mrtg.cfg
接著配置:
- vim /etc/mrtg/mrtg.cfg
輸入以下:
- HtmlDir: /opt/mrtg
- ImageDir: /opt/mrtg
- LogDir: /var/lib/mrtg
- ThreshDir: /var/lib/mrtg
- Target[rl]: 2:public@localhost
- MaxBytes[rl]: 1250000
- Title[rl]: 流量監測系統
- Xsize[rl]: 600
- Options[rl]: gauge, nopercent, growright
再配置crontab:
crontab -e
輸入:
- */5 * * * * env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
代表每5分鐘收集一次數據顯示。
done
以上配置方法在cent os 5.5 64位rhel5.5的64位分別成功。
【編輯推薦】
責任編輯:zhaolei
來源:
liuhuadong