Giter Site home page Giter Site logo

apache2piwik's Introduction

Apache2Piwik Exporter, version 1.0, June 2011

This software is released under GPL v3 license:
http://www.gnu.org/licenses/gpl-3.0.html 

Description
===========
Apache2Piwik is a script written in Python to enable exporting
statistics from Apache logs to Piwik.


Requirements
============
- Access to Piwik 1.4 or 1.5 Installation.
- Access to Apache logs with read rights.
- Python 2.6 with components:
        - MySQLdb
        - pygeoip (http://code.google.com/p/pygeoip)
        - httpagentparser (http://pypi.python.org/pypi/httpagentparser/0.8.2)        
        - PyQt4 (http://www.riverbankcomputing.co.uk/software/pyqt/download) --gui version only


Preparation
===========
Before running the script please be sure to:
- Prepare `settings.py` configuration file - sample in settings.py.sample
- Create backup of your Piwik MySQL Database


Running
=======
$ cd apache2piwik
$ python apache2piwik.py


Running with options
====================
You can override ID_SITE, APACHE_LOG_FILES, CHRONOLOGICAL_ORDER, CONTINUE from settings.py

Examples:
$ python apache2piwik.py -c0 -b0 -f "log1.txt;log2.txt" -i3
$ python apache2piwik.py -c0 -b1 -f "log1.txt" -i3

Usage: apache2piwik.py [start|stop] [OPTIONS]

Options:
  --version                                  show program's version number and exit
  -h, --help                                 show this help message and exit
  -f FILES, --file=FILES                     apache log files, files names should be ;-seperated, (overrides APACHE_LOG_FILES)
  -b {0 or 1} --chronological_order={0 or 1}    if files are chronologicaly orderd, (overrides CHRONOLOGICAL_ORDER)
  -c {0 or 1} --continue={0 or 1}               if you want to run script more than one time on one set of data (overrides CONTINUE)
  -i INT, --id_site=INT                      Piwik id site (overrides ID_SITE)
  -r, --remove_cache    Remove cache files
  -g, --goal            Create data for goals


Goals
=====
If you add new goals after data are in database, run
$ python apache2piwik.py -g
to update the goals data in database. 
Remember to delete piwik_archive_blob and piwik_archive_numeric tables before viewing result in piwik.

Running daemon
==============
First set LIFE variable in settings to True and FREQUENCY_OF_READING as you wish.
To start a daemon on log file run
$ python apache2piwik.py start
and to stop
$ python apache2piwik.py stop

Running GUI
===========
$ cd Apache2Piwik
$ python apache2piwikgui.py

Building binaries
=================
- Make sure you have all the requirements, including PyQt4
- Get pyinstaller (http://www.pyinstaller.org/)
- Run:
$ python /path/to/pyinstaller/Configure.py
$ python /path/to/pyinstaller/Makespec.py --onefile Apache2Piwik/apache2piwikgui.py
$ python /path/to/pyinstaller/Build.py apache2piwikgui.spec
- Copy Apache2Piwik/lib/* to dist/lib/*

Contact
=======
Copyright (C) 2011 by Clearcode (http://clearcode.cc)

Development Team:
Małgorzata Jurkiewicz
Maciej Zawadziński
Piotr Rzepecki

Contact: [email protected]

apache2piwik's People

Contributors

clearcode avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.