Sisynala
Sisynala is a web log file analyser.
Usage
Usage: sisynala
logfile
Requirements
Sisynala is written in Python.
If you wish to generate graphs, install the gdchart Python module.
If you wish to use IP to Country lookup, install the GeoIP Python module.
Download
Installation
Sisynala uses python distutils. Use the following:
python setup.py install
To use without installing, use:
env PYTHONPATH=. python scripts/sisynala
Quick Start
You should create a localconfig.py file in the directory from which you're going to run sisynala. Or, set PYTHONPATH to a directory in which your localconfig.py lives. This allows you to easily have multiple configurations for different log files. Or just stick it in the sisynala python directory if you're certain you're going to only have one.
There's an example localconfig.py in the examples/ directory of the source distribution, and in share/examples/sisynala once you've installed.
EXCLUDEDBYFUNC is a function that is called to exclude certain types of traffic for reasons that can't be covered by the other exclusion mechanisms.
MY_AGENTS and PLACES_I_VISIT are helper lists used by the example EXCLUDEDBYFUNC function, and can be tossed if you're not using them. Return 0 from the function if the line should not be ignored; return 1 if it should be.
Change MY_REFERERS to your web site URL, and any other local names that might apply to your web site.
Change EXCLUDEIPS to anything that's almost certainly coming from your own bots (like I exclude my planet and some other automated scripts) and for people who screw you around and can't be blocked in any way but IP address.
EXCLUDESEARCHES are exact search phrases (ie, not partial matches) to exclude from the searches page.
IP_TO_NAME is for if you don't use name resolution (I don't, personally) and want to identify certain IPs by name. You can identify multiple IPs as the same name, and they'll be grouped.
REFERERSPAMMERS are for domains which have been used as fake referers to generate links back to that domain in your statistics pages.
Change HTMLEXCLUDEPATTERNS to string patterns (currently, not needed regex yet) applied to the full path of the request. I don't care about people going to ' /stats/ ', for example, so I exclude it.
HTMLPATTERNS (which only things that pass HTMLEXCLUDEPATTERNS get passed through) lists string patterns applied to the full path of the request which _will_ be considered valid HTML files (ie, not downloads). You can just put ' / ' in there to include everything.
DOWNLOADEXCLUDEPATTERNS is analogous to HTMLEXCLUDEPATTERNS , except it affects what gets considered a download.
DOWNLOADPATTERNS is analogous to HTMLPATTERNS . You might want to put something like ' .tar.gz ' or whatever in there if you don't have specific download directories (ie, like /files/ and /dist/ on my site).
Release process
- Update version strings in sisynala/__init__.py.
- svn copy svn+ssh://stiletto.moria.org/svnroot/sisynala/trunk svn+ssh://stiletto.moria.org/svnroot/sisynala/branches/0.9.17
- cd /tmp
- svn co svn://stiletto.moria.org/svnroot/sisynala/branches/0.9.17 sisynala-0.9.17
- cd sisynala-0.9.17
- python setup.py sdist
- scp dist/sisynala-0.9.17.tar.gz stiletto.moria.org:dist/sisynala/