[CentOS7] goaccess – web 로그분석

goaccess 

goaccess 를 이용하면 nginx , apache log 를 실시간으로 분석 할수 있습니다.

web page 로 report 형식으로 볼수 있으며 cacti , nagios 만큼 설치가 어렵지 않습니다.

https://goaccess.io/

 

의존성 패키지 설치

[root@centos76 ~]# yum -y install epel-release
[root@centos76 ~]# yum -y install ncurses-devel gcc geoip-devel tokyocabinet-devel

 

goaccess 설치

[root@centos76 ~]# wget https://tar.goaccess.io/goaccess-1.3.tar.gz
[root@centos76 ~]# tar xvf goaccess-1.3.tar.gz
[root@centos76 ~]# cd goaccess-1.3/
[root@centos76 goaccess-1.3]# ./configure --enable-utf8 --enable-geoip=legacy

~중략
Your build configuration:

  Prefix         : /usr/local
  Package        : goaccess
  Version        : 1.3
  Compiler flags :  -pthread
  Linker flags   : -lnsl -lncursesw -lGeoIP -lpthread
  Dynamic buffer : no
  Geolocation    : GeoIP Legacy
  Storage method : In-memory Hash Database (Default)
  TLS/SSL        : no
  Bugs           : goaccess@prosoftcorp.com

[root@centos76 goaccess-1.3]#

[root@centos76 goaccess-1.3]# make && make install
[root@centos76 goaccess-1.3]# ln -s /usr/local/bin/goaccess /usr/bin/goaccess

 

goaccess 실행

[root@centos76 ~]# goaccess /var/log/nginx/access.log --log-format=COMBINED

 

 

html report 생성

[root@centos76 ~]# goaccess /var/log/nginx/access.log --log-format=COMBINED -a -o /usr/share/nginx/html/report.html

 

댓글 남기기