« Proftpd Issues | Home | A Time server »

September 24, 2005

Using MRTG with snmpd in Debian

apt-get update apt-get install snmpd

vi /etc/snmp/snmpd.conf

replace:

# sec.name source community com2sec paranoid default public #com2sec readonly default public #com2sec readwrite default private

with:

# sec.name source community #com2sec paranoid default public com2sec readonly default hughr #com2sec readwrite default private
/etc/init.d/snmpd restart

apt-get install mrtg

cd /etc

cfgmaker hughr@127.0.0.1 > mrtg.cfg

vi mrtg.cfg

Add:

WorkDir: /var/www/mrtg

excute this:

mrtg /etc/mrtg.cfg

a few more times till it outputs no errors.

let’s create the index.html file with:

indexmaker –output=/var/www/mrtg/index.html –title=”Welcome to Hell” /etc/mrtg.cfg

edit the crontab file:

crontab -e

*/5 * * * * /usr/bin/mrtg /etc/mrtg.cfg

All done.

Posted by Lifeng Shen on September 24, 2005 5:30 PM |

评论

添加评论







固定链接与引用