Giter Club home page Giter Club logo

visitor_analysis's Introduction

visitor_analysis

analysis the visitor ip address from nginx log

Usage

analysis the log file which has been modified in latest 5 days, the log filename must include "access" keywords

python main.py -d 5 --file-name-keywords access

analysis single file

python main.py --file-name access.log

analysis the log file which modified time between 20170601 and 20170630

python main.py --start-date 20170601 --end-date 20170630 --file-name-keywords access

if your nginx log file is not default /var/log/nginx, you need to specify the log directory explicitly

python main.py --log-path /var/log/nginx_log_dir --file-name-keywords access

Additional

Sometimes you want to exclude robot visit records.you can specify the log which is to be analysised that must include some keywords or exclude some keywords,to do that,you can change the script line 19 and line 20.

exclude_keywords = ['google','baidu','.aspx','spider','robots','gt-i9500']
include_keywords = ['www.elsonwx.com']

Example

example

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.