CentOS上面的 MRTG快速配置
简单配置(仅监控网络流量) 1000yumsearchmrtg 1001yuminstallmrtg.i386 1002rpm-qa|grepnet-snmp 1003yuminstallnet-snmpnet-snmp-develnet-snmp-utils 1004cat/etc/snmp/snmpd.conf 1005cp/etc/snmp/snmpd.conf/etc/snmp/snmpd.confbak 1006vi/etc/snmp/snmpd.conf 1007diff/etc/snmp/snmpd.conf/etc/snmp/snmpd.confbak 1008servicesnmpdstart 1009chkconfig--level2345snmpdon 1010netstat-nltp|grepsnmp 1011netstat-unltp|grepsnmp 1012history 1013rpm-qa|grepzlib 1014rpm-qa|greplibpng 1015rpm-qa|grepfreetype 1016rpm-qa|grepjpeg 1017rpm-qa|greplibxml2 1018rpm-qa|grepgd 1019whereismrtg 1020whereiscfgmaker 1021/usr/bin/cfgmakerpublic@localhost>/etc/mrtg/mrtg.cfg 1022vi/etc/mrtg/mrtg.cfg 1023mkdir-p/usr/local/apache/htdocs/mrtg 1024whereisindexmaker 1025/usr/bin/indexmaker/etc/mrtg/mrtg.cfg-output=/usr/local/apache/htdocs/mrtg/index.html-title="AibangMRTG" 1026whereismrtg 1027envLANG=C/usr/bin/mrtg/etc/mrtg/mrtg.cfg 1028envLANG=C/usr/bin/mrtg/etc/mrtg/mrtg.cfg 1029envLANG=C/usr/bin/mrtg/etc/mrtg/mrtg.cfg #crontab-l */3****envLANG=C/usr/bin/mrtg/etc/mrtg/mrtg.cfg http://ip/mrtg/index.html 参考: http://www.chinaunix.net/jh/29/923115.html 部分重要文件内容如下: cat/etc/snmp/snmpd.conf|sed'/^#/d'|sed'/^$/d' com2secnotConfigUserdefaultpublic groupnotConfigGroupv1notConfigUser groupnotConfigGroupv2cnotConfigUser viewsystemviewincluded.1.3.6.1.2.1.1 viewsystemviewincluded.1.3.6.1.2.1.2 viewsystemviewincluded.1.3.6.1.2.1.25.1.1 accessnotConfigGroup""anynoauthexactmib2nonenone viewmib2included.iso.org.dod.internet.mgmt.mib-2fc syslocationUnknown(edit/etc/snmp/snmpd.conf) syscontactRoot<root@localhost>(configure/etc/snmp/snmp.local.conf) pass.1.3.6.1.4.1.4413.4.1/usr/bin/ucd5820stat #cat/etc/mrtgmrtg.cfg|sed'/^#/d'|sed'/^$/d' orkDir:/usr/local/htdocs/mrtg Options[_]:growright,bits EnableIPv6:no Language:gb2312