解决mrtg的Use of uninitialized value in hash element at /usr/bin/indexmaker line 35

mrtg的安装过程这里就不再阐述,随便搜索一下。使用indexmaker生成首页文件的时候提示:

Use of uninitialized value in hash element at /usr/bin/indexmaker line 352
确认安装了snmp
yum install net-snmp-devel net-snmp-utils
service snmpd restart

 

 

修改/etc/snmp/snmpd.conf

#vi /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/local/mrtg/bin/cfgmaker  --ifdesc=descr public@IP   -global "WorkDir:/usr/local/apache/htdocs/mrtg" --global "RunASDaemon:yes" --global "Options[_]:growright,bits">/usr/local/apache/htdocs/mrtg/mrtg.cfg


生成配置文件

/usr/local/mrtg/bin/indexmaker  /usr/local/apache/htdocs/mrtg/mrtg.cfg >/usr/local/apache/htdocs/mrtg/index.html


生成首页。

以上命令的参数、路径根据您的实际情况相应的修改

你可能感兴趣的:(element)