MRTG Installation

MRTG Installation

  1. yum install net-snmp-libs net-snmp-devel net-snmp-utils
  2. yum install mrtg
  3. cfgmaker -global ‘WorkDir: /var/www/html/mymrtg’ -output /etc/mrtg/cisco_switch_mrtg.cfg communityname@192.168.1.1 (Switch/Router IP Address)
  4. indexmaker –output=/var/www/html/mymrtg/index.html /etc/mrtg/ cisco_switch_mrtg.cfg
  5. cp -av /var/www/mrtg/*.png /var/www/html/mymrtg/
  6. /usr/bin/mrtg   /etc/mrtg/ cisco_switch_mrtg.cfg
  7. env LANG=C /usr/bin/mrtg /etc/mrtg/mymrtg.cfg –logging /var/log/mrtg.log
  8. make the following entry in the crontab (crontab -e)
    */1 * * * *  env LANG=C /usr/bin/mrtg /etc/mrtg/ cisco_switch_mrtg.cfg

fw-Router#
fw-Router# config t
fw-Router(config)#

fw-Router(config)#snmp-server contact Manoj Chauhan
fw-Router(config)#snmp-server community communityname
fw-Router(config)#snmp-server enable traps all (Enable all traps)
fw-Router(config)#snmp-server host inside 192.168.1.6 udp-port 161 (inside Name of interface GigabitEthernet0/1)
fw-Router(config)#wr mem

From the MRTG just run to check the snmp
snmpwalk -v 2c -c coldstart 192.168.1.1 (Firewall IP Address) | more

This entry was posted on Saturday, October 31st, 2009 at 6:19 am and is filed under MRTG. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 Responses to “MRTG Installation”

  1. Pawan Kumar Says:

    To test snmp configurtions if snmp configured properly or not.
    we can run ,
    #snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex

  2. Manoj Chauhan Says:

    yes, you are right. basically snmpwalk is linux tool to use monitor network traffic using SNMP

Leave a Reply