Install Traffic MRTG

MRTG atau Multi Router Traffic Grapher, salah satu tools yang fungsinya merupakan monitoring traffic in & out. MRTG di bangun oleh pemrograman bahasa Perl dan Bahasa C yang di buat oleh Tobias Oetiker.

Adapun Mrtg dapat diinstal dengan syarat :

  • sudah ada program perl

  • APACHE / Web Server sudah terinstalasi dengan baik.

Source – source dapat diperoleh dari :

  • http://fedora.cbn.net.id/

  • http://people.ee.ethz.ch/~oetiker/webtools/mrtg

  • http://www.google.com

Download source – source di berikut ini :

  1. net-snmp-5.1.1.tar.gz

  2. zlib-1.2.1.tar.gz

  3. libpng-1.2.6.tar.gz

  4. gd-2.0.32.tar.gz

  5. httpd-2.0.50.tar.gz

  6. mrtg-2.10.14.tar.gz

Adapun distro yang dalam hal ini digunakan adalah LINUX server fedora Core. namun saya rasa tidak begitu banyak perbedaan kalau kita menggunakan distro lainnya.

Tahap Installasi

1. install snmp :

-[root@cacti]=tar -zxvf net-snmp-5.1.1.tar.gz

-[root@cacti]=mv net-snmp-5.1.1 snmp

-[root@cacti]=./configure

-[root@cacti]=make

-[root@cacti]=umask 022

-[root@cacti]=make install

-[root@cacti]=vi /usr/local/share/snmp/snmpd.conf

=====================================

com2sec public default public

group public v1 public

group public v2c public

group public usm public

view all included .1

access public “” any noauth exact all none none

===========================================

-[root@cacti]=/usr/local/sbin/snmpd

-[root@cacti]=netstat -pln | grep snmpd

-[root@cacti]=snmpwalk -v 1 -c public localhost system

2. install zlib :

-[root@cacti]=tar -zxvf zlib-1.2.1.tar.gz -[root@cacti]=mv zlib-1.2.1 zlib

-[root@cacti]=./configure

-[root@cacti]=make

-[root@cacti]=make install

3. install libpng :

-[root@cacti]=tar -zxvf libpng-1.2.6.tar.gz

-[root@cacti]=mv libpng-1.2.6 libpng

-[root@cacti]=cp scripts/makefile.std makefile

-[root@cacti]=make install

4. install gd :

-[root@cacti]=tar -zxvf gd-2.0.32.tar.gz

-[root@cacti]=mv gd-2.0.32 gd

-[root@cacti]=./configure –with-libpng –with-zlib –with-jpeg

-[root@cacti]=make

-[root@cacti]=make install

5. install httpd :

-[root@cacti]=tar -zxvf httpd-2.0.50.tar.gz

-[root@cacti]=mv httpd-2.0.50 httpd

-[root@cacti]=./configure –prefix=/usr/local/apache

-[root@cacti]=make

-[root@cacti]=make install

6. install mrtg :

-[root@cacti]=tar -zxvf mrtg-2.10.14.tar.gz

-[root@cacti]=mv mrtg-2.10.14 mrtg

-[root@cacti]=./configure –prefix=/usr/local/mrtg –with-gd=../gd –with-z=../zlib –with-png=../libpng

-[root@cacti]=make

-[root@cacti]=make install

B. Tahap Konfigurasi :

——————

- Kita asumsikan IP address kita adalah 202.162.xxx.xxx

- folder web server ada pada : /var/www/html/ – folder mrtg ada pada : /var/www/html/mrtg

- folder cfg ada pada : /var/www/html/mrtg/cfg

1. konfigurasi Cfgmaker untuk mrtg nya :

-[root@cacti]=/usr/local/mrtg/bin/cfgmaker –global “WorkDir: /var/www/html/mrtg” > –global “Options[_]: growright,bits” > public@202.162.xxx.xxx > /var/www/html/mrtg/cfg/202.162.xxx.xxx.cfg

2. konfigurasi indexmaker :

-[root@cacti]=/usr/local/mrtg/bin/indexmaker –output=/var/www/html/mrtg/index.html > /var/www/html/mrtg/cfg/202.162.xxx.xxx.cfg

3. Let’s Start mrtg :

-[root@cacti]=/usr/local/mrtg/bin/mrtg /var/www/html/mrtg/cfg/202.162.xxx.xxx.cfg

Note : jika ada option error coba cek message error nya.

contoh :

= export LANG=UTF-8

= echo $LANG

Kalo ada :

env LANG=C /usr/local/mrtg/bin/mrtg /var/www/html/mrtg/cfg/10.10.30.4.cfg

4. Untuk mengecek status mrtg :

-[root@cacti]=netstat -pln | grep perl

5. tambahkan option di bawah ini ke dalam file cfg :

-[root@cacti]=vi /var/www/html/mrtg/cfg/202.162.xxx.xxx.cfg

================================ =Agar auto start

RunAsDaemon:Yes

=Agar uptodate setiap 5 menit

Interval:5

=Agar auto resfresh pada browser

Refresh:300

================================

6. Tambahkan ke menu /etc/rc.local :

-[root@cacti]=vi /etc/rc.local

======================

rm -f /var/run/*.pid

/usr/local/mrtg/bin/mrtg /var/www/html/mrtg/cfg/202.162.xxx.xxx.cfg

/usr/local/sbin/snmpd ======================

. 7. agar mrtg mereload setiap 5 menit sekali, maka masukan option ini pada crontab :

-[root@cacti]=crontab -e */5 * * * * /usr/local/mrtg/bin/mrtg /var/www/html/mrtg/cfg/202.162.xxx.xxx.cfg

8. Lihat hasil mrtg pada :

http://localhost/mrtg/index.html


Related posts:

  1. Tips Mudah Meningkatkan Traffic dan Visitor
  2. Tips How to Install Google Earth in Ubuntu Hardy Heron
  3. Install WordPress dgn Hosting dan Domain Gratis
  4. Tips Install Driver WiFi Acer Aspire 4315 di Ubuntu Hardy Heron
  5. Cara install n konfigurasi Printer Canon PIXMA IP1600 / 1700 di Debian / Ubuntu

Leave a Reply