MRTG and SNMP on an eTRAYZ

ANd the next eTRAYZ mod: MRTG.

1. Install net-snmp
ipkg install net-snmp

2. Install mrtg
ipkg install mrtg

3. Change config snmpd.conf in /opt/etc/snmpd.conf to reflect these changes:
# rocommunity: a SNMPv1/SNMPv2c read-only access community name
# arguments: community [default|hostname|network/bits] [oid]

rocommunity public

# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
# arguments: community [default|hostname|network/bits] [oid]

#rwcommunity SNMPv1_RW

4. Restart snmpd daemon with
/opt/etc/init.d/S70net-snmp restart

5. Make mrtg folder with
mkdir /opt/etc/mrtg

6. Create mrtg profile for localhost with
cfgmaker public@localhost >> /opt/etc/mrtg/mrtg.cfg

7. Make mrtg WorkDir with
mkdir /home/sysadmin/WWW/mrtg

8. Reflect this folder as WorkDir in
vi /opt/etc/mrtg/mrtg.conf

9. Make HTML file with
indexmaker --output=/home/sysadmin/WWW/mrtg/index.html /opt/etc/mrtg/mrtg.cfg

10. Make crontab entry with crontab -e and add
*/5 * * * * root cd /opt/bin/ && ./mrtg /opt/etc/mrtg/mrtg.cfg --logging /var/log/mrtg.log

11. Restart cron with
crond restart

12. To be sure, reset permissions:
chown -R sysadmin:etrayz /home/sysadmin/WWW/mrtg/

13. Browse to http://etrayz/mrtg/index.html and enjoy.

Leave a Reply

Your email address will not be published. Required fields are marked *