Beberapa hari yang lalu saya coba-coba intall MRTG, tapi sering mengalami kegagaln:( Knp yah??? Capekkk deh…….jadinya harus troubleshootimg terus……but, sekarang udah lega coz udah berhasil semua:)
Sebelum menginstall MRTG pertama yang harus di perhatikan adalah untuk instalasi snmp. Setelah snmp sudah jalan semua barulah kita jalankan MRTG:) Selain itu pastikan komputer linux anda untuk apache perl sudah berjalan normal. Jika apache perl belum ada, maka anda harus install terlebih dahulu caranya disini. Langsung saja yah, langkah-langkahnya sebagai berikut :
Download disini dulu yah, mrtg dan snmp.
Setelah kedua file diatas sudah di download, sekarang kita harus install gcc terlebih dahulu
#apt-get install gcc build-essential
Sekarang kita masuk ke direktori file yang kita download tadi :
#tar -zxf mrtg-2.15.2.tar.gz
masuk ke direktori
#cd
#./configure
#make
#make install
Selesai.
Untuk instalasi snmp
#tar -zxf net-snmp-5.4.1.pre1.tar.gz
masuk ke direktori
#cd
#./configure
#make
#make install
Selesai
Jika sudah berhasil makan akan muncul direktori untuk mrtg yang berlokasi di /var/www/mrtg.
Edit file /etc/snmp/snmpd.conf dengan editor kesayangan anda
#vi /etc/snmp/snmpd.conf
Menjadi seperti ini
# sec.name source community
#com2sec paranoid defaut public
#com2sec readonly default public
#com2sec readwrite default private
com2sec readonly default public
com2sec readonly 172.16.8.0/24 public
####
# Second, map the security names into group names:
# sec.model sec.name
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
####
####
# Third, create a view for us to let the groups have rights to:
# incl/excl subtree mask
view all included .1 80
view system included .iso.org.dod.internet.mgmt.mib-2.system
####
# Finally, grant the 2 groups access to the 1 view with different
# write permissions:
# context sec.model sec.level match read write notif
access MyROSystem “” any noauth exact system none none
access MyROGroup “” any noauth exact all none none
access MyRWGroup “” any noauth exact all all none
# —————————————————————————–
Restart snmp
#/etc/init.d/snmpd restart
Test apakah snmp kita sudah jalan apa belom :
#snmpwalk -v 2c -c public localhost
Jika sudah berhasil, langkah berikutnya membuat file mrtg.cfg. Perintah ini dilakukan 1x saja, maskudnya anda tidak perlu menjalankan perintah ini lagi ketika menambah index snmp yang akan di capture.
#cfgmaker public@localhost > /etc/mftg.cfg
Kunjungi website baru saya www.cyberkios.com visit my new website
Kemudian memasukkan file mrtg.cfg ke index.html . Perintah ini berguna agar router/pc yang kita capture bisa keluar di web (index.html)
#indexmaker /etc/mrtg.cfg >> /var/www/index.html
Selesai, sekarang anda tinggal melihat hasilnya via browser kesayangan anda di alamat
http://localhost/mrtg
Tunggu sekitar 5 menit, jika semuanya sudah berhasil maka akan tampil seperti berikut
Kritik dan saran kirim ke xlam27@yahoo.com

salam mas…wah tolong mas aku nyoba kok ndak bisa2 ya.. saya pakai ubuntu server. sudah 3 hari
nginstal mrtgnya kok ribet banget yaa.harus ngompile library macam2 tapi ndak pernah bisa. cuma tips diatas mentok di nomer satu.ditanya lib terus pada hal gdlib,pnglib,zlib sudah ke install(perasaan saya)gimana ngecek kalau lib2 tadi sudah jalan benar pakai mode consol),apa salah penempatannya library yaa.. bisa kasih saran mas..thanks banyak.(saya pakai apache2 sudah aktif juga) mentok nginstal librarynya yang ngak bener saya menduganya soale saya juga pemula.server saya squid,firewall shorewall udah jalan normal..thank u 1 x lagi
#apt-get install libapache2-mod-php4 php4-cli php4-common php4-cgi
Jangan lupa jalankan perintah diatas, soalnya server harus ada apache yang support PHP.:)
Jika anda ikuti step by step InsaAllah bisa:) Kalau masih ada maslah bisa balik kesini, kalau ada error yang lebih detail yah sebutinnya….
Gak perlu atur iptablesnya ya bos? Kan ada port udp yg kudu dibuka (kalo gak salah sii…. :p)
Numpang nimbrung nih Mas…
Thanks berat infonya. Artikel bagus! Dua jempol buat dirimu Bos.. Sukses untuk pekerjaan dan keluarga!
Salam kenal, Mas..
Mas, mo nanya ni…
bisa gak dijelasin pake skema jaringannya Mas.. letak server MRTGnya.. gimana setting server ato IP yg mau diamatin lewat mrtgnya Mas…
terima kasih Mas, buat bagi-bagi ilmunya…
server MRTG gak harus diletakkan di router/gateway. Kebetulan saya mengunakan pc kantor, posisi saya sebagai client kok:) yang penting di tiap2 pc client (yang akan dimonitoring) harus anda install snmp dan satu network.
Salam kenal mas….
Mas aku mau nanya……
aku udah install mrtg apa mrtg itu harus di jalanin di X-windows…?? klo di jalanin di CLI bisa ndak…?? soalnya waktu aku jalanin mrtg di CLI ada pesan error kayak gini..
“ERROR : Mrtg will most likely not work properly when the environment variable LANG is set to UTF-8. Please run mrtg in an environment where this is not the case. Try the following command to start :
env LANG=C /usr/bin/mrtg”
makasih Mas, sebelumnya…saya sangat membutuhkan bantuannya…..:d
gak harus, kalau erornya seperti itu kayknya ada malasah pada setting pemilihan bahasa. Coba anda ganti bahasa dalam komputer anda , dengan perintah :
dpkg-reconfigure locales
Semoga bisa membantu
sudah mas…
sudah saya coba dengan perintah itu ternyata masih keluar ERROR yang sama….gimana ya ??? saya pake ubuntu 7.04 feisty…
Numpang nimbrung nih Mas…
@ ryan
Coba perintahnya dibikin seperti yang tertera di error messagenya.. Jadi
# env LANG=C /usr/bin/mrtg
Salam.
Numpang nimbrung nih Mas…
@ ryan
Maaf, seharusnya begini..
# env LANG=C /usr/bin/mrtg config-file
CMIIW
makasih mas maprur….:)
tapi ada masalah lagi sekarang keluar “ERROR: unable to open config file: config-file” gitu mas….gimana ya..??
mohon pencerahan….
terima kasih buat semua yang sudah memberikan masukkan…:)
REGARDS,
RYAN
saya ko masih bingung dan ragu…
parameter benar ato salahnya, berhasil ato ngga nya ko
masih belum jelas buat saya…
saya sudah sampai pada tahap menampilkan di browser
tp ko yang keluar bukan file index.html, tapi file
“localhost_2.html”
shg pada browser harus tertulis
http://localhost/mrtg/localhost_2.html
disitu disebutkan grafik warna hijau adalah “in” traffic
grafik warna biru adalah “out” traffic
tp punya saya tdk keluar sama sekali grafik in dan outnya
mohon petunjuk..
trus supaya kalo mesin restart mrtg tetep up gimana, coz setiap kalo restart mrtgnya terus mati..lalu saya jalankan lagi /etc/init.d/snmpd restart dan /usr/bin mrtg hasilnya error mulu…help me..?
salam bos … saya sudah coba ikutin step2nya … tapi setelah dipanggil dari localhost koq keluar dibrowsernya gak langsung … keluar menu pilihan …
[DIR] Parent Directory -
[IMG] localhost_eth0-day.png 13-Aug-2008 16:03 1.5K
[IMG] localhost_eth0-month.png 13-Aug-2008 15:55 1.4K
[IMG] localhost_eth0-week.png 13-Aug-2008 15:55 1.4K
[IMG] localhost_eth0-year.png 13-Aug-2008 15:55 1.7K
[TXT] localhost_eth0.html 13-Aug-2008 16:03 6.4K
[ ] localhost_eth0.log 13-Aug-2008 16:03 47K
[ ] localhost_eth0.old 13-Aug-2008 16:02 47K
[IMG] localhost_eth2-day.png 13-Aug-2008 16:03 1.5K
[IMG] localhost_eth2-month.png 13-Aug-2008 15:55 1.4K
[IMG] localhost_eth2-week.png 13-Aug-2008 15:55 1.4K
[IMG] localhost_eth2-year.png 13-Aug-2008 15:55 1.7K
[TXT] localhost_eth2.html 13-Aug-2008 16:03 6.4K
[ ] localhost_eth2.log 13-Aug-2008 16:03 47K
[ ] localhost_eth2.old 13-Aug-2008 16:02 47K
[IMG] mrtg-l.png 04-Mar-2008 23:58 538
[IMG] mrtg-m.png 04-Mar-2008 23:58 414
[IMG] mrtg-r.png 04-Mar-2008 23:58 1.7K
[IMG] mrtg-ti.png 04-Mar-2008 23:58 4.2K
Salah dimananya yah …. tulung dung
thank you…
indexmaker /etc/mrtg.cfg >> /var/www/mrtg/index.html
ini yg bener boss….
Wah kalo kekurangan lib di ubuntu untuk dependensi nya ketik aja di shell sudo apt-get -f install
Hmm.., saya coba2 ga bisa tuh. Kliatan nya masih harus compile library2 yang support mrtg. Seperti zlib dan libpng. Mohon mas ADMIN untuk melengkapi tutorial nya yang lengkap supaya temen2 kita disini bisa mencoba MRTG. Terima Kasih.
mas,,saya numpang tanya..
klo untuk login ke localhost mrtgnya
ada caranya ga ya mas,..
klo ada, saya minta tlg ksh tw saya bisa mas??
makasi ya mas. . .
mas kenapa kalau punya saya ada error seperti ini :root@VPN:/data/web/debian# cfgmaker –global ‘WorkDir:/var/www/mrtg’ –global ‘Options[_]: bits,growright’ –output /etc/mrtg.cfg public@202.138.xxx.xxx
SNMP Error:
no response received
SNMPv1_Session (remote host: “202.138.xxx.xxx” [202.138.233.111].161)
community: “public”
request ID: -1187503519
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/share/perl5/SNMP_util.pm line 627
SNMPWALK Problem for 1.3.6.1.2.1.1 on public@202.138.xxx.xxx::::::v4only
at /usr/bin/cfgmaker line 925
WARNING: Skipping public@202.138.xxx.xxx: as no info could be retrieved
sehingga kalau di buka di browser ga ada apa2 cuma ada gambar yang bertulisan MRTG aja
pandu@pandu-echa:~/Ubuntu/Networking/mrtg-2.15.2$ sudo ./configure
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ANSI C… none needed
checking how to run the C preprocessor… gcc -E
checking whether make sets $(MAKE)… yes
checking for a BSD-compatible install… /usr/bin/install -c
checking for perl… /usr/bin/perl
checking for groff… /usr/bin/groff
checking for egrep… grep -E
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking for inttypes.h… (cached) yes
checking for unsigned long long… yes
checking for long long… yes
checking for strtoll… yes
checking for printf long long format specifier… %lld
checking for pow in -lm… yes
checking for gdImageGif in -lgd… no
checking for gdImagePng in -lgd… no
checking for gdImagePng_jpg in -lgd… no
checking for gdImagePng_jpg_ft in -lgd… no
checking for gdImageGd in -lgd… no
checking gd.h usability… no
checking gd.h presence… no
checking for gd.h… no
** Ooops, one of many bad things happened:
a) You don’t have the GD library installed.
Get it from http://www.boutell.com, compile it and
use either –with-gd-lib=DIR and –with-gd-inc=DIR to specify
its location. You might also have to use –with-z-inc,
–with-z-lib and –with-png-inc, –with-png-lib for gd
versions 1.6 and higher. Check config.log for more
information on the problem.
b) You have the GD library installed, but not the gd.h
header file. Download the source (see above) and use
–with-gd-inc=DIR to specify where the file can be found.
c) You have the library and the header file installed, but
you also have a shared GD library in the same directory.
Remove the shared library files and/or links (e.g.
libgd.so.2.0.0, libgd.so and libgd.so.2). This is especially
likely if you’re using a recent (post 1.8.4) version of GD
and didn’t configure it with –disable-shared.
d) You have gd library installed and also it’s headers, but you are
missing libpng (and headers) or freetype (and headers)
(mrtg does not use freetype, but if your copy of gd is precompiled
against it, you have to install it …
Consider following the instructions in doc/mrtg-unix-guide.txt
apanya yang salah yach mas? tolong dijelaskan dung
hi mas slam kenal..:)
wah, asyik nih tutorialnya…
langsung ikutin insturksi..
langsung bsa running snmpd-ny n mrtg view d browser..
cz repo telah siap d komputr gw..
jadi tinggal centang2 aja tuh d software package managernnya.he
sip..;)
mantep..^^
btw, buat testingnya gmna ya..
cz ni gw buat server buat develop n gk konek ke jaringan beneran, testing mrtgny udh bnar buat ngmonitoring traffic in n outnya snmp gmna ya…hmm??
ada saran mas??:)
thx b4