Posts tagged 扩展
AWStats的自定义扩展统计:Using the Extra Sections features
0如何利用AWStats针对网站自身应用进行特定参数的统计,今天学习了一下:AWStats Documentation – Using the Extra Sections features。文档中主要有以下几个例子:
# Example 1: Tracking Product orders
跟踪商品订单:解析出GET /cgi-bin/order.cgi?productid=49&session=A0B1C2 中的productid=字段
# Example 2: Tracking Bugzilla most frequently viewed bugs
跟踪bugzilla中最经常被访问的Bug:原理同上,这在内部开发中非常有用,类似的,也很容易给BBS系统配置出最常访问的论坛等统计。
# Example 3: Tracking Exit clicks
跟踪用户离开当前网站的点击:前提是你将所有指向其他网站的链接通过/cgi-bin/awredir.pl?url=http://externalsite/pagelinked这样的链接进行部署。
# Example 4: Tracking aborted download
跟踪中断的下载:利用的是HTTP返回的状态码206 ExtraSectionCodeFilter1=”206″
# Example 5: Tracking most requested domain aliases
跟踪最常用的域名别名:这需要在日志中部署并定义扩展字段%your_extra_field,然后在ExtraSestion中部署统计相应的扩展字段 %your_extra_field 这里的例子就是将域名的别名,在一个域名有多个别名的时候,分析那个域名最常用最有帮助。
# Example 6: List of top level 2 path under a directory /mydir
跟踪某个目录下最常访问的2级子目录,根据样例设置了一个 /tech /blog 2个目录下的TOP文章统计。
增加的配置如下
ExtraSectionName1=”Top aticles under /tech”
ExtraSectionCodeFilter1=”200 304″
ExtraSectionCondition1=”URL,^/tech/.*”
ExtraSectionFirstColumnTitle1=”Article Name”
ExtraSectionFirstColumnValues1=”URL,^/tech/([w]+).html”
ExtraSectionFirstColumnFormat1=”<a href=’/tech/%s.html’ target=’new’>%s</a>”
ExtraSectionStatTypes1=PHL
MaxNbOfExtra2=20
MinHitExtra2=1
(更多…)
给AWStats增加针对Googlebot/Baiduspider/Yahoo!Slurp/MSNBot的详细统计
2
虽然AWStats中提供了蜘蛛的分类统计:
搜索引擎网站的机器人 (前 10) – 全部列出 – 最近参观日期
102 个机器人* 文件数 字节 最近参观日期
Sina Iask Spider 41894 520.80 M字节 2006年 九月 09日 07:17
GouGou 34577 920.11 M字节 2006年 九月 09日 12:23
Googlebot 12171+39 212.60 M字节 2006年 九月 09日 12:23
Yahoo Slurp 5775+1275 91.10 M字节 2006年 九月 09日 12:24
GigaBot 5334+233 53.62 M字节 2006年 九月 09日 12:24
Unknown robot (identified by ‘robot’) 5421+6 71.46 M字节 2006年 九月 09日 12:17
Lilina 5278 76.67 M字节 2006年 九月 09日 12:22
MSNBot 4075+217 52.31 M字节 2006年 九月 09日 12:19
Yahoo! Slurp China 3135+460 25.83 M字节 2006年 九月 09日 12:21
Unknown robot (identified by ‘crawl’) 3431+6 78.98 M字节 2006年 九月 09日 12:23
有汇总后的数据,但是每个蜘蛛具体抓取了那些页面和抓取的频度就无法得知了,利用AWStats的扩展配置,统计也可以详细到每个蜘蛛的具体访问(参考了http://www.antezeta.com/awstats.html上的配置样例)。
注意:配置完Extra后可能会遇到以下这样的警告: (更多…)
awstats 纯perl的方式 安装geoip插件
0There is a rumor that GeoIP is not supported by Powweb. This is
completely false. It must first be configured prior to use. Now stay
with me so I don’t lose you…
1. Install your own copy of
awstats in the cgi-bin directory. Once this is working properly, you
may move on to the next step. There is a tutorial for this on the
Powweb site under “Site Statistics” I believe.
2. Download GeoIP::PurePerl module from Maxmind.com
http://www.maxmind.com/download/geoip/api/pureperl/
1.17
is the latest version as of Sept 1, 2005. This is a tar.gz file so make
sure you have WinRAR or another compatible decompressor.
3. Once
decompressed, create a directory in your cgi-bin called GeoIP (You can
name it anything you like, but for this tutorial it shall be GeoIP).
Move the contents from the decompressed folder to “/cgi-bin/GeoIP/”.
The decompressed folder should be called “Geo-IP-PurePerl-1.xx”. Now
before we configure we need to get the latest database.
安装 MaxMind GeoIP、GeoIP City Lite 为 awstats 配置 IP 位置国家城市统计信息
1安装 MaxMind GeoIP、GeoIP City Lite 为 awstats 配置 IP 位置国家城市统计信息
http://www.maxmind.com/download/geoip/api/c/
http://www.maxmind.com/download/geoip/api/c/GeoIP-1.4.4.tar.gz
http://www.maxmind.com/download/geoip/api/perl/
http://www.maxmind.com/download/geoip/api/perl/Geo-IP-1.31.tar.gz
http://www.maxmind.com/app/geolitecity
http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
安装配置全程脚本:
# 下载
wget http://www.maxmind.com/download/geoip/api/c/GeoIP-1.4.4.tar.gz
wget http://www.maxmind.com/download/geoip/api/perl/Geo-IP-1.31.tar.gz
wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
AWStats上的IP(城市信息解析包安装 GeoIP City Lite)
0一、简介
MaxMind的GeoIP非常流行的地理信息Web应用包。原先提供的免费版只提供了一个IP=>国家的,但是对于网站的统计来说:精确到城市级
别的才有比较好的分析价值。最近MaxMind提供了一个IP=>城市的简化版本。可以用于AWStats的分析统计。
但是对于中国城市还不是很全,不过还能出来beijing henan这样的东东,大体还能看,呵呵…
二、安装
1、安装GeoIP的C API和Perl API
www.maxmind.com/download/geoip/api/c/
www.maxmind.com/download/geoip/api/perl/
wget www.maxmind.com/download/geoip/api/c/GeoIP-1.3.14.tar.gz
tar zxf GeoIP-1.3.14.tar.gz
cd GeoIP-1.3.14
./configure
make
make install
wget www.maxmind.com/download/geoip/api/perl/Geo-IP-1.27.tar.gz
tar zxf Geo-IP-1.27.tar.gz
cd Geo-IP-1.27
perl Makefile.PL
make
make install
2、下载MaxMind’s GeoLiteCity database
www.maxmind.com/app/geolitecity
www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gzip -d GeoLiteCity.dat.gz
大约25M
3、配置awstates
复制GeoLiteCity.dat到/usr/local/share/GeoIP/下
然后修改awstats.panzhiqi.conf中的
LoadPlugin=”geoip_city_maxmind GEOIP_STANDARD /usr/local/share/GeoIP/GeoLiteCity.dat”
等待crontab中的update下次执行的时候就可以看到城市信息了,性能很好。
Powered by ScribeFire.