Changes between Version 1 and Version 2 of AwStatsInstall


Ignore:
Timestamp:
06/22/13 16:43:06 (3 years ago)
Author:
chris
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AwStatsInstall

    v1 v2  
     1[[PageOutline(2-5, Table of Contents, floated)]] 
    12= AWStats = 
    23 
     
    6162}}} 
    6263 
     64== Processing the logs == 
     65 
     66We don't want to keep IP addresses in the log files -- we want to remove them so the stats can be made public, and the perl script http://wiki.opennicproject.org/Tier2ConfigObfuscatingLogs looks like it will do the job: 
     67 
     68{{{ 
     69#! /usr/bin/perl 
     70# 
     71# blurAddys.pl - Obfuscate IP addresses in a file 
     72# 
     73# cat some.log | blurAddys.pl > some_blurred.log 
     74# 
     75##################################################################### 
     76use strict; 
     77 
     78while(<STDIN>) 
     79{ 
     80        s/\d{1,3}(\.|-)\d{1,3}(\.|-)\d{1,3}(\.|-)\d{1,3}/XX$1XX$2XX$3XX/g; 
     81        #s/([0-9A-Fa-f]{4}:[0-9A-Fa-f:]+:[0-9A-Fa-f]{1,4})([^:0-9A-Fa-f])/XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX$2/g; 
     82        print $_; 
     83} 
     84}}} 
     85 
     86The regular expression for ipv6 addresses was matching the date so that has been commented out.  
     87 
     88So the above perl script was saved to {{{/usr/local/bin/blurAddys.pl}}} 
     89 
     90== Awstats install == 
     91 
     92Deb installed: 
     93 
     94{{{ 
     95aptitude search awstats 
     96 
     97The following NEW packages will be installed: 
     98  awstats libnet-xwhois-perl{a} 
     99}}} 
     100