freebsd log analyzer

2
Standar Instalasi FreeBSD @ Institut Manajemen Telkom ( http://www.imtelkom.ac.id) Instalasi Webalizer Webalizer adalah aplikasi untuk menganalisa log file dari squid dan apache dan menampilkan hasil analisanya di web dalam format tabel dan grafik. Analisa yang bisa diberikan oleh webalizer mencakup : 1. Situs yang banyak diakses 2. Situs yang banyak di-download 3. User yang banyak mengakses 4. User yang banyak men-download Dimana analisa diberikan dalam time frame daily, monthly, yearly. Instalasi Webalizer sangat sederhana : # cd /usr/ports/www/webalizer # make install clean ……… <tunggu sampai selesai> ……… Edit file konfigurasi webalizer di /usr/local/etc/webalizer.conf # cat /usr/local/etc/webalizer.conf LogType clf untuk menganalisa log file Apache (httpd-access.log) LogType squid untuk menganalisa log file Squid (access.log) OutputDir /data/web/usage HistoryName webalizer.hist PageType htm* PageType cgi PageType php* PageType pl Quiet yes ReallyQuiet yes CountryGraph no DailyGraph no DailyStats no HourlyGraph yes HourlyStats no GraphLegend yes GraphLines 5 TopSites 100 menganalisa 100 situs yg paling banyak diakses TopKSites 0 TopURLs 100 menganalisa 100 URL yg paling banyak diakses TopKURLs 0 TopReferrers 0 TopAgents 0 TopCountries 0 TopEntry 0 TopExit 0 TopSearch 0 TopUsers 0 HideURL *.gif HideURL *.GIF HideURL *.jpg HideURL *.JPG HideURL *.png HideURL *.PNG

Upload: telkom-institute-of-management

Post on 20-Jun-2015

950 views

Category:

Education


9 download

DESCRIPTION

a tutorial guide explaining how to install FreeBSD to use webalizer, an experience at IMTelkom (http://www.imtelkom.ac.id)

TRANSCRIPT

Page 1: FreeBSD Log Analyzer

Standar Instalasi FreeBSD @ Institut Manajemen Telkom (http://www.imtelkom.ac.id)

Instalasi Webalizer

Webalizer adalah aplikasi untuk menganalisa log file dari squid dan apache dan menampilkan hasil analisanya di web dalam format tabel dan grafik. Analisa yang

bisa diberikan oleh webalizer mencakup : 1. Situs yang banyak diakses 2. Situs yang banyak di-download 3. User yang banyak mengakses

4. User yang banyak men-download Dimana analisa diberikan dalam time frame daily, monthly, yearly.

Instalasi Webalizer sangat sederhana : # cd /usr/ports/www/webalizer

# make install clean

……… <tunggu sampai selesai> ………

Edit file konfigurasi webalizer di /usr/local/etc/webalizer.conf # cat /usr/local/etc/webalizer.conf

LogType clf untuk menganalisa log file Apache (httpd-access.log)

LogType squid untuk menganalisa log file Squid (access.log)

OutputDir /data/web/usage

HistoryName webalizer.hist

PageType htm*

PageType cgi

PageType php*

PageType pl

Quiet yes

ReallyQuiet yes

CountryGraph no

DailyGraph no

DailyStats no

HourlyGraph yes

HourlyStats no

GraphLegend yes

GraphLines 5

TopSites 100 menganalisa 100 situs yg paling banyak diakses

TopKSites 0

TopURLs 100 menganalisa 100 URL yg paling banyak diakses

TopKURLs 0

TopReferrers 0

TopAgents 0

TopCountries 0

TopEntry 0

TopExit 0

TopSearch 0

TopUsers 0

HideURL *.gif

HideURL *.GIF

HideURL *.jpg

HideURL *.JPG

HideURL *.png

HideURL *.PNG

Page 2: FreeBSD Log Analyzer

Standar Instalasi FreeBSD @ Institut Manajemen Telkom (http://www.imtelkom.ac.id)

HideURL *.ra

Catatan : LogType hanya boleh 1 saja (Apache atau Squid). Untuk menganalisa ke-2 log (Apache dan Squid), maka kita harus membuat 2 buah webalizer.conf.

Lalu jalankan Webalizer dgn menggunakan shell script yg diaktifkan via cron spt contoh di bawah ini :

WEBALIZER="/usr/local/bin/webalizer"

WEBALIZER_OPTION="-Q -F clf -c /usr/local/etc/webalizer.conf"

TODAY=`date "+%Y%m%d"`

/usr/local/sbin/apachectl stop

/bin/mv /var/log/httpd-access.log /var/log/${TODAY}.httpd-access.log

/bin/mv /var/log/httpd-error.log /var/log/${TODAY}.httpd-error.log

/usr/bin/touch /var/log/httpd-access.log

/usr/bin/touch /var/log/httpd-error.log

/usr/local/sbin/apachectl start

${WEBALIZER} ${WEBALIZER_OPTION} /var/log/${TODAY}.httpd-access.log