How to analysis Nginx log using visitors

Dwonload web log analysis tool visitors

visitors home page:

http://www.hping.org/visitors/

🚕 Download ane compIle visitors

tuenhai@ubuntu:~$ mkdir download
$ cd download
$ wget http://www.hping.org/visitors/visitors-0.7.tar.gz
$ tar -xzf visitors*
$ cd visitors-0.7
$ make
$ mkdir ~/bin
$ mv visitors ~/bin/
$ chmod 700 ~/bin/visitors

🗽 Set PATH

$ cd ~
~$ vi .profile
export PATH="$PATH:~/bin"
~$ source .profile

🚌 Creae a bash file to parse Nginx log file

~$ cd logs
logs$ vi parselog
visitors -A -m 30 tuenhai.com_access.log -o html --trails --prefix https://www.tuenhai.com  > --prefix https://www.tuenhai.com ~/public/tuenhai.com.html

logs$ chmod 700 parselog
./parselog

parameters:

  • -A --all

    Activate all the optional reports. This option is equivalent to -GKUWRDOB. Note that --trails is not implicitly included in this option because it also requires --prefix. See the --trails option documentation for details.

  • -m --max-lines number

    Set the max number of entries that should be shown in reports like referers, keyphrases and so on. This option sets all the reports max number of entries for all the reports at once

  • -T --trails

    Enable the Web Trails feature. The report will show what are the more frequent moves between pages of your site. This option requires the --prefix option to work

  • -P --prefix number

    Prefixes specify to visitors how a link should look like to be classified as internal to your site. This option is required for --trails and will also have the nice effect to avoid that internal links are shown in the referers report. If you are analyzing statistics for https://www.tuenhai.com, just use:

    --prefix https://www.tuenhai.com
    

    If your site is reachable using more hostnames you should specify all these, like in the following example:

    --prefix https://www.tuenhai.com --prefix https://tuenhai.com
    

😸 View HTML log report

https://tuenhai.com /tuenhai.com.html

Referers:

results matching ""

    No results matching ""