释义:
AWStats在Sourceforge发展很快的一个基于Perl的WEB日志分析工具。
相对于另外一个非常优秀的开放源代码的日志分析工具Webalizer,AWStats的优势在于:
1.界面友好:可以根据浏览器直接调用相应语言界面(有简体中文版)
2.基于Perl:并且很好的解决了跨平台问题,系统本身可以运行在GNU/Linux上或Windows上(安装了ActivePerl后);分析的日志直接支持Apache格式 (combined)和IIS格式(需要修改)。Webalizer虽然也有Windows平台版,但目前已经缺乏 维护;AWStats完全可以实现用一套系统完成对自身站点不同WEB服务器:GNU/Linux/Apache和Windows/IIS服务器的统一统计。
3.效率比较高:AWStats输出统计项目比Webalizer丰富了很多,速度仍可以达到Webalizer的1/3左右,对于一个日访问量 百万级的站点,这个速度都是足够的;
4.配置/定制方便:系统提供了足够灵活但缺省也很合理的配置规则,需要修改的缺省配置不超过3,4项就可以开始运行,而且修改和扩展的插件还是 比较多的;
5.AWStats的设计者是面向精确的"Human visits"设计的,因此很多搜索引擎的机器人访问都被过滤掉了,因此有可能比其他日志统计工具统计的数字要低,来自公司内部的访问也可以通过IP过滤 设置过滤掉。
6.提供了很多扩展的参数统计功能:使用ExtraXXXX系列配置生成针对具体应用的参数分析会对产品分析非常有用。
AWStats 是一个免费的强大而有个性的工具,带来先进的网络,流量,FTP或邮件服务器统计图. 本日志分析器作为CGI或从命令行在数个图形网页中显示你日志中包含的所有可能信息. 它利用一部分档案资料就能经常很快地处理大量日志档案, 它能分析日志文件来自从各大服务器工具 ,如 Apache日志档案 s (NCSA combined/XLF/ELF log format or common/CLF log format), WebStar, IIS (W3C的日志格式)及许多其他网站,Proxy(代理服务器)、Wap、流量服务器、邮件服务器和一些 FTP服务器 .
看一看这个比较表在最著名统计工具 (AWStats, Analog, Webalizer,...)之间有何特点和不同的想法.
AWStats 是一个在GNU通用公共许可证下发行的免费软件. 你可以看看这个许可证图表而知道你可以/不可以做.
由于AWStats工程来自网上信息,但也作为CGI、 它可以与允许进入Perl,CGI与日志的大型网站主办提供商一起工作.[1]
所以我们就不举例安装webalizer,直接高级的,当然大家可以参考这个也能将webalizer做出来。
首先我们先安装perl
Yum安装
解压awstats
[root@localhost awstats-7.1.1]# tar -zxvf awstats-7.1.1.tar.gz
建立两个目录分别用于存放站点日志分析配置文件,一个用于存放日志信息
[root@localhost awstats-7.1.1]# mkdir /etc/awstats
[root@localhost awstats-7.1.1]# mkdir /var/lib/awstats
然后将awstats-7.1.1移动到/usr/local/目录下面
[root@localhost ~]# mv awstats-7.1.1 /usr/local/
然后配置awstats
 [root@localhost tools]# perl awstats_configure.pl
 
----- AWStats awstats_configure 1.0 (build 1.9) (c) Laurent Destailleur -----
This tool will help you to configure AWStats to analyze statistics for
one web server. You can try to use it to let it do all that is possible
in AWStats setup, however following the step by step manual setup
documentation (docs/index.html) is often a better idea. Above all if:
- You are not an administrator user,
- You want to analyze downloaded log files without web server,
- You want to analyze mail or ftp log files instead of web log files,
- You need to analyze load balanced servers log files,
- You want to 'understand' all possible ways to use AWStats...
Read the AWStats documentation (docs/index.html).
 
-----> Running OS detected: Linux, BSD or Unix
Warning: AWStats standard directory on Linux OS is '/usr/local/awstats'.
If you want to use standard directory, you should first move all content
of AWStats distribution from current directory:
/usr/local/awstats-7.1.1
to standard directory:
/usr/local/awstats
And then, run configure.pl from this location.
Do you want to continue setup from this NON standard directory [yN] ? y
 
-----> Check for web server install
 
Enter full config file path of your Web server.
Example: /etc/httpd/httpd.conf
Example: /usr/local/apache2/conf/httpd.conf
Example: c:\Program files\apache group\apache\conf\httpd.conf
Config file path ('none' to skip web server setup):
> none
 
Your web server config file(s) could not be found.
You will need to setup your web server manually to declare AWStats
script as a CGI, if you want to build reports dynamically.
See AWStats setup documentation (file docs/index.html)
 
-----> Update model config file '/usr/local/awstats-7.1.1/wwwroot/cgi-bin/awstats.model.conf'
  File awstats.model.conf updated.
 
-----> Need to create a new config file ?
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ? y
 
-----> Define config file name to create
What is the name of your web site or profile analysis ?
Example: www.mysite.com
Example: demo
Your web site, virtual server or profile name:
> www.aaaa.com
 
-----> Define config file path
In which directory do you plan to store your config file(s) ?
Default: /etc/awstats
Directory path to store config file(s) (Enter for default):
>  
 
-----> Create config file '/etc/awstats/awstats.www.aaaa.com.conf'
 Config file /etc/awstats/awstats.www.aaaa.com.conf created.
 
-----> Add update process inside a scheduler
Sorry, configure.pl does not support automatic add to cron yet.
You can do it manually by adding the following command to your cron:
/usr/local/awstats-7.1.1/wwwroot/cgi-bin/awstats.pl -update -config=www.aaaa.com
Or if you have several config files and prefer having only one command:
/usr/local/awstats-7.1.1/tools/awstats_updateall.pl now
Press ENTER to continue...
 
 
A SIMPLE config file has been created: /etc/awstats/awstats.www.aaaa.com.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for 'www.aaaa.com' with command:
> perl awstats.pl -update -config=www.aaaa.com
You can also build static report pages for 'www.aaaa.com' with command:
> perl awstats.pl -output=pagetype -config=www.aaaa.com
 
Press ENTER to finish...
根据提示进行操作
因为awstats是基于apache进行监控的所以我们去修改apache的配置文件,
 
编辑修改apache的成功的日志存放的位置
vim /etc/awstats/awstats.www.aaa.com.conf(该文件awstats_configure.pl在安装的时候产生的)
然后开始测试,我们大家先看之前的日志
这个是我们测试之前的检测结果,可以看出所以的记录都为0,也就是我们没有收到访问,上图的日志文件也为1308行
然后我们访问一次www.aaaa.com然后在看结果:
呵呵,看到结果没,记录加1,然后日志也加了1,所以就证明我们awstats检测是正确的,但是为了方便管理,也是这篇博客的目的我们把它重定向到一个网页内,从而方便管理
然后我们访问
http://127.0.0.1/awstats.html
成功,页面我们也能管理了。
我们试一下用在虚拟机外用域名访问
成功,这样我们就可以随时随地的进行对访问web的日志分析监控。
<如果不懂什么事perl的话,可以查看我的其他博客,有详细的介绍的>

转载于:https://blog.51cto.com/yiqiannian/1186125

强大的Web日志分析工具_AWSTATS 应用实例相关推荐

  1. GoAccess - 可视化 Web 日志分析工具

    GoAccess - 可视化 Web 日志分析工具. 官方地址: https://www.goaccess.cc/ 一 语法 goaccess [filename] [ options ... ] [ ...

  2. nginx 关闭access日志_可视化实时Web日志分析工具,堪称神器!

    说到web服务器就不得不说Nginx,目前已成为企业建站的首选.但由于种种历史原因,Nginx日志分析工具相较于传统的apache.lighthttp等还是少很多. 今天就和大家分享一个非常强大的实时 ...

  3. GoAccess 一款好用的web日志分析工具

    GoAccess 是什么? GoAccess 是一款开源的且具有交互视图界面的实时 Web 日志分析工具,通过你的 Web 浏览器或者 *nix 系统下的终端程序(terminal)即可访问.能为系统 ...

  4. web 日志分析工具 awstats 简单安装

    awstats安装使用 awstats是一个开源的日志分析工具,用perl编写.感觉还不错,把安装记录写下,也许有人用的到. 可以分析大部分标准日志数据,如apache的,nginx的都可以 首先下载 ...

  5. mysql+web日志分析工具_WEB日志格式及分析工具

    WEB日志是网站分析和网站数据数据整理最基础的数据,了解其格式和组成将有利于更好地进行数据的收集.处理和分析. 一.日志格式类型 目前常见的WEB日志格式主要由两类,一类是Apache的NCSA日志格 ...

  6. mysql+web日志分析工具_用Python+MySQL实现2017年web日志分析报告

    日志分析在web系统中故障排查.性能分析方面有着非常重要的作用.目前,开源的ELK系统是成熟且功能强大的选择.但是部署及学习成本亦然不低,这里我实现了一个方法上相对简单(但准确度和效率是有保证的)的实 ...

  7. 一款开源且具有交互视图界面的实时 Web 日志分析工具

    前言 在 Linux 操作系统下,分析日志文件是一件非常头疼的事情,它记录了很多日志,对于大多数的新手及系统管理员不知该如何下手进行分析,除非你在分析日志方面有足够的经验积累,那就是 Linux 系统 ...

  8. GoAccess日志分析工具,适用于Nginx/Apache/IIS 等

    最近了解到一款Nginx日志分析工具GoAccess ,这里记录一下. 1 介绍 GoAccess 是一款开源(MIT许可证)的且具有交互视图界面的实时 Web 日志分析工具,通过你的 Web 浏览器 ...

  9. awstats linux日志分析,Linux 日志分析工具之AWStats详解

    一.前言 二.awstats 简介 三.awstats 特点 四.awstats 运行原理 五.awstats 安装与配置详解 六.awstats 执行日志分析 七.awstats 进行多站点日志分析 ...

最新文章

  1. CSP认证201803-3 URL映射[C++题解]:字符串处理、模拟
  2. ASP中SQL语句参考及记录集对象
  3. [Asp.net]AspNetPager分页组件
  4. RTMPdump(libRTMP)源代码分析 4: 连接第一步——握手(Hand Shake)
  5. PHP的time函数返回时间不正确
  6. 23种设计模式(8)-外观模式
  7. 重新安装Linux自带的JDK
  8. 锐浪报表 Grid++Report 免注册DLL C/S报表开发(二)清单文件manifest分析
  9. jenkins + docker + SpringBoot
  10. 仿Tumblr点赞心破碎动画
  11. ROS——在Ubuntu18.04下基于ROS Melodic编译python3的cv_bridge
  12. Batch Normalization论文翻译——中文版
  13. C++改Java——个人银行账户管理
  14. 高分毕业论文答辩自述稿(附注意事项及模板)
  15. python画名侦探柯南_名侦探柯南资源
  16. SWPU新生赛2021 Crypto部分WriteUp
  17. tensorflow 歌曲题材分类
  18. jpa中表的@OneToMany等关联关系
  19. 倍福--连接欧姆龙EtherCAT伺服案例
  20. 有没有鹅有没有鹅有没有鹅有没有鹅有没有鹅

热门文章

  1. 使用python爬取教程生成PDF
  2. SourceInsight-显示文件完整路径
  3. HTTP长连接和短连接 + Websocket
  4. 搭建hue遇到的错误 Couldn't find log associated with operation handle: OperationHandle
  5. Unicode和UTF-8的关系
  6. str_repeat() 函数
  7. 使用py2exe打包python脚本为exe可执行程序
  8. rate-limit
  9. 马路上的“懦夫游戏”和比特币现金共识升级冲突
  10. 比特币现金(BCH)独立日一周年庆!里程碑一览!