19:11 Monday, November 11 2004
mrtg
I've been trying to get mrtg working for the past few days without much success. The problem wasn't so much mrtg as snmp. I know close to zero about snmp, and I was seeing some bizarre cryptic errors when i was trying to run mrtg, where it couldn't connect to snmp.
Thanks to some help from someone on the linux-users mailing list, i finally got mrtg working properly.
Here's the snmpd.conf that I ended up using:
com2sec readonly default public
group MyROSystem v1 paranoid
group MyROSystem v2c paranoid
group MyROSystem usm paranoid
group MyROGroup v1 readonly
group MyROGroup v2c readonly
group MyROGroup usm readonly
group MyRWGroup v1 readwrite
group MyRWGroup v2c readwrite
group MyRWGroup usm readwrite
view all included .1 80
view system included .iso.org.dod.internet.mgmt.mib-2.system
access MyROSystem "" any noauth exact system none none
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
syslocation Silly Valley California
syscontact Root
And here's the mrtg.cfg that I used:
WorkDir: /var/www/mrtg
ThreshDir: /var/www/mrtg
Target[r1]: 1:public@hal:
SetEnv[r1]: MRTG_INT_IP="10.0.0.1" MRTG_INT_DESCR="eth0"
MaxBytes[r1]: 1250000
Title[r1]: Traffic Analysis for eth0
PageTop[r1]: Stats for eth0
</p>