Lukman Prihandika Blog's

Nrimo ing pandum, urip wis ono sing ngatur

Posts Tagged ‘trafik

Monitoring Latency Jitter with Smokeping

leave a comment »

Salah satu tool monitoring trafik yang lumayan menarik untuk di coba adalah smokeping. Aplikasi ini khusus di buat untuk mengamati paket loss, latency dan jitter. Berikut cara installasinya,

root@brokenz:~# aptitude install smokeping curl libauthen-radius-perl libnet-ldap-perl libnet-dns-perl libio-socket-ssl-perl libnet-telnet-perl libsocket6-perl libio-socket-inet6-perl apache2

Sedikit ubah settingan konfigurasi di /etc/smokeping/config.d/General

root@brokenz:~# vi /etc/smokeping/config.d/General

*** General ***

@include /etc/smokeping/config.d/pathnames

# Please edit this to suit your installation
owner    = Falko Timme
contact  = satriyaningjagat@gmail.com
cgiurl   = http://xxx.xx.xx.xx/cgi-bin/smokeping.cgi
mailhost = smtp.gmail.com
# specify this to get syslog logging
syslogfacility = local0
# each probe is now run in its own process
# disable this to revert to the old behaviour
# concurrentprobes = no

Setting configurasi email sent

root@brokenz:~# vi /etc/smokeping/config.d/Alerts

*** Alerts ***
to = satriyaningjagat@gmail.com
from = smokealert@busda.com
[...]

Ubah tampilan judul di menu home web dan tambahkan host yang ingin di probe

root@brokenz:~# vi /etc/smokeping/config.d/Targets

[...]
remark = Selamat datang di Smokeping kami
[...]

[...]
+ World

menu = World
title = World

++ Europe

menu = Europe
title =European Connectivity

+++ Germany

menu = Germany
title = German Connectivity
alerts = bigloss,someloss,startloss

++++ Heise

menu = Heise
title = Heise
host = www.heise.de

+++ UK

menu = United Kingdom
title = United Kingdom

++++ BBC

menu = BBC
title = BBC
host = bbc.co.uk

++ USA

menu = North America
title =North American Connectivity

+++ MIT

menu = MIT
title = Massachusetts Institute of Technology Webserver
host = web.mit.edu

Simpan dan lihat hasilnya di http://xxx.xx.xx.xx/cgi-bin/smokeping.cgi

Written by brokenz1

January 7, 2010 at 4:41 am

Monitoring Trafik via Console with Vnstat

leave a comment »

Seperti yang sudah kita ketahui, ada banyak sekali software opensource untuk monitoring trafik jaringan berbasis web seperti MRTG, CACTI, Nagios dll. Semua software diatas mempunyai kelebihan masing-masing, namun saya ingin memonitoring trafik dengan console atau biasa disebut terminal. Saya menggunakan vnstat untuk monitoring ini, nah bagaimana cara menggunakan dan menginstall nya.

Step 1,

Download vnstat dengan aptitude (maaf disini saya menggunakan Ubuntu Sabily 9.04)

root@brokenz:~# aptitude install vnstat

Step 2,

Aktifkan vnstat yang sudah kita install tadi, namun sebelumnya buat databasenya dulu dengan

root@brokenz:~# vnstat -u -i eth0

  • -u ; artinya memaksa untuk mengupdate database dari interface atau membuat database jika belum ada
  • -i eth0 ; menentukan interface secara spesifik

Step 3,

Buat dulu crontab nya dengan perintah

root@brokenz:~# crontab -e

0-55/5 * * * *   root    /usr/bin/vnstat -u

Simpan hasilnya.

Step 4,

Bagaimana cara mengoperasikannya, kita bisa lihat manualnya dengan man vnstat. Saya akan memberikan beberapa contoh hasil monitoring trafik saya via console.

Gambar diatas monitoring dengan vnstat -h yang artinya melihat berdasarkan jam.

Gambar diatas monitoring dengan vnstat -d yang artinya melihat berdasarkan hari.

Gambar diatas monitoring dengan vnstat -m yang artinya melihat berdasarkan bulan.

Gambar diatas monitoring dengan vnstat -l yang artinya melihat trafik secara real time.

Agar vnstat selalu startup otomatis ketika komputer menyala maka isikan pada Applications -> System Toos -> Ubuntu Tweak -> Startup -> Autostart -> Add

Name : vnstat eth0

Command : vnstat -u -i eth0

Comment : [kosongkan saja]

Jika belum ada Ubuntu Tweak, install dulu dengan cara

root@cacti:~# vi /etc/apt/sources.list

deb http://ppa.launchpad.net/tualatrix/ubuntu intrepid main

Simpan hasilnya dan update kemudian install

root@cacti:~# aptitude update

root@cacti:~# aptitude install

Nah sekarang bagaimana melihat via web, langkahnya sebagai berikut :

Step 1,

Dengan xampp, download dulu xampp nya di sini, dan install

root@cacti:~# tar zxvf xampp-1.x.x -C /opt

Matikan service apache2 nya dulu jika masih jalan

root@cacti:~# /etc/init.d/apache2 stop

Jalankan service xampp atau lampp nya

root@cacti:~# /opt/lamp/lamp start

Step 2,

Download Vnstat PHP Frontend

root@cacti:~# wget http://www.sqweek.com/sqweek/files/vnstat_php_frontend-1.4.1.tar.gz

root@cacti:~# tar zxvf vnstat_php_frontend-1.4.1.tar.gz -C /opt/lamp/htdocs

Rename dengan nama vnstat agar lebih singkat

root@cacti:~# mv vnstat_php_frontend-1.4.1.tar.gz vnstat

Edit file config.php pada baris 32, 39-41, 56

root@cacti:~# cd vnstat

root@cacti:~# vi config.php

$iface_list = array(‘eth0′, ‘eth1′);

//
// optional names for interfaces
// if there’s no name set for an interface then the interface identifier
// will be displayed instead
//
$iface_title['eth0'] = ‘Internal’;
$iface_title['eth1'] = ‘Internet’;
$iface_title['sixxs'] = ‘SixXS IPv6′;

//
// There are two possible sources for vnstat data. If the $vnstat_bin
// variable is set then vnstat is called directly from the PHP script
// to get the interface data.
//
// The other option is to periodically dump the vnstat interface data to
// a file (e.g. by a cronjob). In that case the $vnstat_bin variable
// must be cleared and set $data_dir to the location where the dumps
// are stored. Dumps must be named ‘vnstat_dump_$iface’.
//
// You can generate vnstat dumps with the command:
//   vnstat –dumpdb -i $iface > /path/to/data_dir/vnstat_dump_$iface
//
$vnstat_bin = ‘ ‘;

Menjadi seperti ini,

$iface_list = array(‘eth0′);

//
// optional names for interfaces
// if there’s no name set for an interface then the interface identifier
// will be displayed instead
//
$iface_title['eth0'] = ‘Internal’;
//$iface_title['eth1'] = ‘Internet’;
//$iface_title['sixxs'] = ‘SixXS IPv6′;

//
// There are two possible sources for vnstat data. If the $vnstat_bin
// variable is set then vnstat is called directly from the PHP script
// to get the interface data.
//
// The other option is to periodically dump the vnstat interface data to
// a file (e.g. by a cronjob). In that case the $vnstat_bin variable
// must be cleared and set $data_dir to the location where the dumps
// are stored. Dumps must be named ‘vnstat_dump_$iface’.
//
// You can generate vnstat dumps with the command:
//   vnstat –dumpdb -i $iface > /path/to/data_dir/vnstat_dump_$iface
//
$vnstat_bin = ‘/usr/bin/vnstat’;

Simpan hasilnya dan coba buka di web browser anda di alamat ini http://localhost/vnstat

Written by brokenz1

December 29, 2009 at 7:43 am

Posted in Ubuntu Sabily

Tagged with , , , ,

Cara Install Cacti di Ubuntu

leave a comment »

Alhamdulillah, masih bisa nulis lagi nih :)

Cacti merupakan software untuk memonitoring trafik jaringan dan menampilkan datanya dalam bentuk grafik yang mudah dimengerti dan dipahami tentunya disini merupakan software yang opensource. Sekarang kita mulai bagaimana cara menginstall cacti step by step :

Read the rest of this entry »

Written by brokenz1

October 31, 2009 at 5:14 am

Follow

Get every new post delivered to your Inbox.