Centos Install and Configure MRTG

The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic load on network-links.

MRTG generates HTML pages containing PNG images which provide a LIVE visual representation of this traffic. You need the following packages:

mrtg : Multi Router Traffic Grapher
net-snmp and net-snmp-utils : SNMP (Simple Network Management Protocol) is a protocol used for network management. The NET-SNMP project includes various SNMP tools. net-snmp package contains the snmpd and snmptrapd daemons, documentation, etc. You also want to install the net-snmp-utils package, which contains NET-SNMP utilities.

This FAQ works with RHEL / CentOS and Fedora Linux. Continue reading “Centos Install and Configure MRTG” »


Mrtg: example cfg for memory, cpu, disk etc.

CPU Usage


WorkDir: /var/www/mrtg
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[localhost.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:public@ ssCpuRawSystem.0&ssCpuRawSystem.0:public@
RouterUptime[localhost.cpu]: public@
MaxBytes[localhost.cpu]: 100
Title[localhost.cpu]: CPU Load
PageTop[localhost.cpu]: Active CPU Load %
Unscaled[localhost.cpu]: ymwd
ShortLegend[localhost.cpu]: %
YLegend[localhost.cpu]: CPU Utilization
Legend1[localhost.cpu]: Active CPU in % (Load)
LegendI[localhost.cpu]: Active
Options[localhost.cpu]: growright,nopercent

Memory Usage


LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
Target[localhost.mem]: .
PageTop[localhost.mem]:Free Memory
WorkDir: /var/www/mrtg
Options[localhost.mem]: nopercent,growright,gauge,noinfo
Title[localhost.mem]: Free Memory
MaxBytes[localhost.mem]: 1000000
kMG[localhost.mem]: k,M,G,T,P,X
YLegend[localhost.mem]: bytes
ShortLegend[localhost.mem]: bytes
LegendI[localhost.mem]: Free Memory:
Legend1[localhost.mem]: Free memory, not including swap, in bytes

Memory Monitoring (Total Versus Available Memory)


LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
Target[server.memory]: memAvailReal.0&memTotalReal.0:public@localhost
Title[server.memory]: Free Memory
PageTop[server.memory]: < H1 >Free Memory< /H1 >
MaxBytes[server.memory]: 100000000000
ShortLegend[server.memory]: B
YLegend[server.memory]: Bytes
LegendI[server.memory]: Free
LegendO[server.memory]: Total
Legend1[server.memory]: Free memory, not including swap, in bytes
Legend2[server.memory]: Total memory
Options[server.memory]: gauge,growright,nopercent
kMG[server.memory]: k,M,G,T,P,X Continue reading “Mrtg: example cfg for memory, cpu, disk etc.” »


MRTG Indexmaker

Regular shorcut way:

#indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

Now you need to reboot your system wait for five minutes or so and then take a look at your summary home page. If your Debian,ubuntu,kubuntu system’s IP address is then you’d type in the following in the address bar of a browser running on a system on the same network:

The other Way:

#/usr/bin/indexmaker –output=/var/www/mrtg/index.html \
–title=”Memory and CPU Usage ” \
–sort=name \
–enumerate \
/etc/mrtg/cpu.cfg \
/etc/mrtg/mem.cfg \
/etc/cron.mrtg/memfree \
/etc/cron.mrtg/mempercent \