Name | Date | Size | |
---|---|---|---|
.. | 2016-08-02 17:04:54 | 12 | |
an2_ip.py | 2015-02-28 22:01:24 | 1.6 KiB | |
an2_ip_active.py | 2015-12-26 15:17:04 | 4.4 KiB | |
an_catalog.py | 2015-06-07 15:54:42 | 6.5 KiB | |
an_filelist.py | 2015-12-26 15:17:04 | 3.7 KiB | |
an_first_timestamp.py | 2015-02-28 22:01:24 | 1.8 KiB | |
an_ip_active.py | 2015-09-14 23:25:57 | 3 KiB | |
an_manifest.py | 2015-09-14 23:25:57 | 5.2 KiB | |
an_report.py | 2015-12-26 15:17:04 | 10.4 KiB | |
an_search.py | 2015-09-14 23:25:57 | 7.1 KiB | |
config.py | 2015-09-14 23:25:57 | 1.2 KiB | |
cron.ksh | 2012-05-08 22:21:56 | 2.1 KiB | |
in_footer.py | 2015-02-28 22:01:24 | 989 | |
in_header.py | 2015-02-28 22:01:24 | 3.4 KiB | |
log.css | 2012-05-08 22:21:56 | 1.1 KiB | |
log.py | 2015-12-26 15:17:04 | 3.8 KiB | |
Makefile.data | 2012-05-08 22:21:56 | 4.2 KiB | |
README | 2016-05-13 00:03:59 | 2.2 KiB | |
site-config | 2012-05-08 22:21:56 | 944 | |
split.awk | 2012-05-08 22:21:56 | 1.3 KiB | |
translate.py | 2015-02-28 22:01:24 | 2.9 KiB |
README
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
These scripts are used to gather data and generate reports from the logs of
apaache servers sitting in front of pkg(7) depots.
To get started:
0) Get and install GeoIP
- Retrieve GeoIP-1.4.5.tar.gz from:
- Retrieve GeoIP-Python-1.2.3.tar.gz from:
- Install those.
1) Set up directories/paths
mkdir $HOME/mylogdir # Path you will run the scripts from
ln -s `pwd`/Makefile.data $HOME/mylogdir/Makefile
ln -s `pwd`/site-config $HOME/mylogdir/site-config
2) Tell Makefile about these new paths (and other options)
<edit Makefile.data>
- change LOG_HOME to point to where the scripts live
- change DATA_HOME to point to $HOME/mylogdir
- change RSYNC_* to match your log path/server configuration
- (optional) change AN_FLAGS to suit your needs:
'-w <int>' specifies the window (default 30 days)
'-a <date>' specifies the start date for analysis
3) Site configuration
<edit site-config>
- change the hostname to the hostname of your depot server
- modify excluded to your liking (country codes excluded from analysis)
4) Retrieve your logs
cd $HOME/mylogdir
make retrieve
5) Run the analysis scripts
make empty
make
This should generate you an index.html file, which you can serve via apache or
some other http server.