Skip to content

Install MRTG di Debian Etch

10 September 2007

Akhirnya bisa juga sinau install mrtg di debian Etch. Mrtg adalah Multi Router Traffik Grapher, yaitu grafik untuk bisa melihat traffik yg lewat di router kita.

Sebelumnya perlu menginstall beberapa packet, yaitu :

  1. Snmp dan Snmpd
  2. Mrtg
  3. apache2

Adapun cara2 installasinya adalah :

Karena dengan debian, installasi mudah dilakukan dengan cara :

#apt-get install snmp snmpd mrtg apache dan biarkan proses itu berjalan sampai selesai..

karena sudah ada cronnya, maka yg kita lakukan hanya :

cp /etc/mrtg.cfg /etc/mrtg.cfg.old
cfgmaker passpublic@localhost > /etc/mrtg.cfg
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html

note :

passpublic adalah community yg ada di /etc/snmp/snmpd.conf dan pastikan snmpd sudah berjalan dengan baik.

Untuk mengecek apakah SNMP bekerja dengan baik, jalankan perintah berikut :
snmpwalk -Os -c passpublic -v 1 localhost system.
Perintah di atas akan menghasilkan keluaran seperti berikut :

sysDescr.0 = STRING: Linux frigg 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686
sysObjectID.0 = OID: netSnmpAgentOIDs.10
sysUpTimeInstance = Timeticks: (29668961) 3 days, 10:24:49.61
sysContact.0 = STRING: admin
sysName.0 = STRING: jenmannii

Silahkan ikuti langkah-langkah berikut ini :

root@jenmanni:~# vim /etc/snmp/snmpd.conf

yg harus diedit ada pada perintah:

#sec.name source community
com2sec readonly localhost public12
com2sec readonly 203.190.40.0/24 public23
com2sec readonly 192.168.11.1/32 public23
com2sec readonly 192.168.13.2/32 public23

#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

Passpublic yg saya buat seperti contoh diatas adalah public12, brarti itulah passpublic yg selalu saya gunakan.

kemudian restart snmpnya dengan perintah :
root@tyr:~# /etc/init.d/snmpd restart

root@tyr:~# cfgmaker public12@localhost > /etc/mrtg.cfg

root@tyr:~# snmpwalk -Os -c public12 -v 1 localhost system

sysDescr.0 = STRING: Linux tyr 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i686
sysObjectID.0 = OID: netSnmpAgentOIDs.10
sysUpTimeInstance = Timeticks: (430) 0:00:04.30
sysContact.0 = STRING: Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)
sysName.0 = STRING: tyr
sysLocation.0 = STRING: Unknown (configure /etc/snmp/snmpd.local.conf)
sysORLastChange.0 = Timeticks: (1) 0:00:00.01
sysORID.1 = OID: ifMIB
sysORID.2 = OID: snmpMIB
sysORID.3 = OID: tcpMIB
sysORID.4 = OID: ip
sysORID.5 = OID: udpMIB
sysORID.6 = OID: vacmBasicGroup
sysORID.7 = OID: snmpFrameworkMIBCompliance
sysORID.8 = OID: snmpMPDCompliance
sysORID.9 = OID: usmMIBCompliance
sysORDescr.1 = STRING: The MIB module to describe generic objects for network interface sub-layers
sysORDescr.2 = STRING: The MIB module for SNMPv2 entities
sysORDescr.3 = STRING: The MIB module for managing TCP implementations
sysORDescr.4 = STRING: The MIB module for managing IP and ICMP implementations
sysORDescr.5 = STRING: The MIB module for managing UDP implementations
sysORDescr.6 = STRING: View-based Access Control Model for SNMP.
sysORDescr.7 = STRING: The SNMP Management Architecture MIB.
sysORDescr.8 = STRING: The MIB for Message Processing and Dispatching.
sysORDescr.9 = STRING: The management information definitions for the SNMP User-based Security Model.
sysORUpTime.1 = Timeticks: (0) 0:00:00.00
sysORUpTime.2 = Timeticks: (1) 0:00:00.01
sysORUpTime.3 = Timeticks: (1) 0:00:00.01
sysORUpTime.4 = Timeticks: (1) 0:00:00.01
sysORUpTime.5 = Timeticks: (1) 0:00:00.01
sysORUpTime.6 = Timeticks: (1) 0:00:00.01
sysORUpTime.7 = Timeticks: (1) 0:00:00.01
sysORUpTime.8 = Timeticks: (1) 0:00:00.01
sysORUpTime.9 = Timeticks: (1) 0:00:00.01

root@tyr:~# mkdir /var/www/mrtg/
root@tyr:~# chmod 777 /var/www/mrtg/

membuat direktory mrtg tujuannya untuk menyimpan file index.html history mrtg lalu lintas data yg ada di server kita.

root@tyr:~# indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html
kemudian buka file /etc/mrtg.cfg dan pada :

# to get bits instead of bytes and graphs growing to the right
Options[_]: growright, bits << awalnya di koment (#), lalu dihilangkan dan disave.

Untuk test apakah mrtg sudah berjalan, silahkan buka di browser dengan mengetikkan : http://alamat_ip/mrtg, contoh : http://192.168.1.1/mrtg

dan pertumbuhan traffik berjalan dari kiri kekanan, seperti gambar dibawah ini :

Selamat mencoba..

Iklan
14 Komentar leave one →
  1. antibatakislam permalink
    11 November 2007 18:21

    Keren deh

  2. phann permalink
    19 Desember 2007 10:59

    siiiiiiiiiiiipppppppppppp

  3. 19 Desember 2007 11:15

    @phann

    smoga bermanfaat 🙂

  4. Rahmat permalink
    4 Maret 2008 13:06

    Coba kalo debian etch nya itu dijadiin client snmp, pasti gak jalan.

  5. 4 Maret 2008 13:36

    @Rahmat

    wah emang belum nyoba tuh…

    kasih tahu dong caranya 😀

  6. cemy permalink
    12 Juni 2008 11:08

    bagaimana caranya agar setting snmp diatas bisa juga dibaca oleh SnmpTrafficGrapher (STG) di windows? Kan keren tuh bisa di baca secara real time lewat STG.. bisa ga ya? mohon pencerahannya.

  7. 18 Juni 2008 09:51

    @cemy

    wah saya malah belum mempelajari yg STG-nya.. coba saya liat2 dulu yg STG, tp sepertinya setingan diatas tidak berlaku di STG karena perbedaan platformnya 🙂 cmiiw

  8. kicut permalink
    1 Desember 2009 10:42

    snmp saya kok gak response ya kenapa kira2:
    Timeout: No Response from localhost
    begitu bunyinya…
    mohon pencerahan

  9. 3 Desember 2009 07:50

    @kicut

    Coba di cek di ps -ax nya… running ga snmpnya? atau coba servicenya di stop lalu di start kembali..

  10. 21 November 2012 09:30

    Thank you for the good writeup. It in reality was once a amusement account it.
    Look complicated to far added agreeable from you!

    However, how can we keep in touch?

  11. 26 Maret 2013 16:33

    Great information, however it could be slightly more detailed.
    Not whining, but I hate going from blog to blog to blog just to discover a few answers; why can’t 1 site just have them all for once!

  12. 8 Juni 2013 08:02

    Hello! This post couldn’t be written any better! Reading through this post reminds me of my previous room mate! He always kept chatting about this. I will forward this write-up to him. Fairly certain he will have a good read. Thanks for sharing!

Trackbacks

  1. Mempassword MRTG « Another side about me
  2. Abrão Ximenes | Network Monitoring dengan MRTG

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: