diff options
| author | 2004-02-12 23:35:48 +0000 | |
|---|---|---|
| committer | 2004-02-12 23:35:48 +0000 | |
| commit | f8a7d14c946632c1bea98db0f8bfbcb35f69760e (patch) | |
| tree | d9cd002a815a11d65dbeb2303f605730cce1e87a | |
| parent | 8816d3b3de90cd6b1c2f14ea3aaa4827392d9933 (diff) | |
Added mysql_import_combined_log.pl to distribution with permission from Aaron Jenson
http://www.visualprose.com/software.php (Original Source)
Updated documentation in README for usage of contrib files/scripts
| -rw-r--r-- | contrib/Makefile.in | 5 | ||||
| -rw-r--r-- | contrib/README | 39 |
2 files changed, 42 insertions, 2 deletions
diff --git a/contrib/Makefile.in b/contrib/Makefile.in index 7a020d9..b384fd0 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in | |||
| @@ -3,7 +3,10 @@ | |||
| 3 | # Modify these top variables. | 3 | # Modify these top variables. |
| 4 | SUBDIRS = | 4 | SUBDIRS = |
| 5 | 5 | ||
| 6 | EXTRA_DIST = README create_tables.sql make_combined_log.pl | 6 | EXTRA_DIST = README \ |
| 7 | create_tables.sql \ | ||
| 8 | make_combined_log.pl \ | ||
| 9 | mysql_import_combined_log.pl | ||
| 7 | 10 | ||
| 8 | #Don't modify anything below here | 11 | #Don't modify anything below here |
| 9 | 12 | ||
diff --git a/contrib/README b/contrib/README index 7dac946..bf0e65f 100644 --- a/contrib/README +++ b/contrib/README | |||
| @@ -1 +1,38 @@ | |||
| 1 | This directory contains contributed scripts/programs/utilites related to mod_log_sql. | 1 | This directory contains contributed scripts/programs/utilites for mod_log_sql. |
| 2 | |||
| 3 | * create_tables.sql | ||
| 4 | |||
| 5 | This is the create table SQL commands to create the access, headers_in, | ||
| 6 | headers_out, cookies, and notes tables in the MySQL database. | ||
| 7 | Use it like this. | ||
| 8 | mysql -u user -h host -p apachelogdatabase < create_tables.sql | ||
| 9 | Where: | ||
| 10 | user is the username to log in as, | ||
| 11 | host is the hostname the server is on, | ||
| 12 | apachelogdatabase is the database to put the tables into | ||
| 13 | -p will have mysql ask you for a password for the user | ||
| 14 | |||
| 15 | *make_combined_log.pl | ||
| 16 | |||
| 17 | This perl script will extract the data from mod_log_sql's tables in the | ||
| 18 | database and export a standard Apache combined log file. Use this to run | ||
| 19 | logs through a program like webalizer. | ||
| 20 | |||
| 21 | You must edit the perl script to configure variables before you run it. | ||
| 22 | Usage: | ||
| 23 | ./make_combined_log.pl days virtualhost | ||
| 24 | Where: | ||
| 25 | days is the number of days to fetch (starting from now and going back | ||
| 26 | in time) | ||
| 27 | virtualhost is the name of the virtualhost to retrieve | ||
| 28 | |||
| 29 | Example: | ||
| 30 | ./make_combined_log.pl 2 example.com | ||
| 31 | |||
| 32 | *mysql_import_combined_log.pl | ||
| 33 | |||
| 34 | This is a perl script written by Aaron Jenson that imports a combined log file | ||
| 35 | from apache into a SQL database table.. You can use this script to import logs | ||
| 36 | from a webserver you are converting over from the standard Apache log system to | ||
| 37 | mod_log_sql. A Usage statement can be fetch by running the program with no | ||
| 38 | parameters or with --help or -?. | ||
