前言
LogAnalyzer 是一款syslog日志和其他网络事件数据的Web前端
Adiscon LogAnalyzer is a web interface to syslog and other network event data. It provides easy browsing, analysis of realtime network events and reporting services.
对于任何一个系统而言,日志都是致关重要的,通过日志,系统管理员可以查看系统的运行状况,开发人员可以快速定位问题、分析问题
当系统或应用很分散时,日志就会很分散,给日志分析带来一定不便,awk,sed,grep 等工具的局限性愈发明显,ELK 可以很好解决这个问题,感兴趣可以参考之前的 ELK 搭建 ,ELK 可以高效且有针对性地解决这类问题,同时也有其复杂度和相应的基础开销,有时对于一套相对较小的系统用起来会有点重,这时使用系统自带的 rsyslog 结合 LogAnalyzer 就可以很方便的满足需求
这里分享一下使用 loganalyzer、rsyslog、mysql、apache 搭建一个简单日志服务器的操作过程,详细可以参考 David Tang 的 CentOS 6.5下利用Rsyslog LogAnalyzer MySQL部署日志服务器 (这篇文章准确来说不算原创,是参考他博客的一次实践) 和 官方文档
Tip: 当前的 LogAnalyzer 最新版本为 LogAnalyzer v4.1.3 (v4-beta) ,最新稳定版为 LogAnalyzer v3.6.6 (v3-stable)
概要
环境
代码语言:javascript复制[root@h105 ~]# cat /etc/issue
CentOS release 6.6 (Final)
Kernel r on an m
[root@h105 ~]# uname -a
Linux h105 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@h105 ~]#
安装 httpd
代码语言:javascript复制[root@h105 log]# yum install httpd -y
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Repository base is listed more than once in the configuration
Loading mirror speeds from cached hostfile
epel/metalink | 4.3 kB 00:00
* epel: ftp.cuhk.edu.hk
* extras: mirror.bit.edu.cn
* updates: mirrors.pubyun.com
epel | 4.3 kB 00:00
epel/primary_db | 5.9 MB 00:04
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.2.15-39.el6.centos will be updated
---> Package httpd.x86_64 0:2.2.15-47.el6.centos.4 will be an update
--> Processing Dependency: httpd-tools = 2.2.15-47.el6.centos.4 for package: httpd-2.2.15-47.el6.centos.4.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.2.15-39.el6.centos will be updated
---> Package httpd-tools.x86_64 0:2.2.15-47.el6.centos.4 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Updating:
httpd x86_64 2.2.15-47.el6.centos.4 updates 831 k
Updating for dependencies:
httpd-tools x86_64 2.2.15-47.el6.centos.4 updates 77 k
Transaction Summary
====================================================================================================================================
Upgrade 2 Package(s)
Total download size: 908 k
Downloading Packages:
(1/2): httpd-2.2.15-47.el6.centos.4.x86_64.rpm | 831 kB 00:00
(2/2): httpd-tools-2.2.15-47.el6.centos.4.x86_64.rpm | 77 kB 00:00
------------------------------------------------------------------------------------------------------------------------------------
Total 1.3 MB/s | 908 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : httpd-tools-2.2.15-47.el6.centos.4.x86_64 1/4
Updating : httpd-2.2.15-47.el6.centos.4.x86_64 2/4
Cleanup : httpd-2.2.15-39.el6.centos.x86_64 3/4
Cleanup : httpd-tools-2.2.15-39.el6.centos.x86_64 4/4
Verifying : httpd-2.2.15-47.el6.centos.4.x86_64 1/4
Verifying : httpd-tools-2.2.15-47.el6.centos.4.x86_64 2/4
Verifying : httpd-2.2.15-39.el6.centos.x86_64 3/4
Verifying : httpd-tools-2.2.15-39.el6.centos.x86_64 4/4
Updated:
httpd.x86_64 0:2.2.15-47.el6.centos.4
Dependency Updated:
httpd-tools.x86_64 0:2.2.15-47.el6.centos.4
Complete!
[root@h105 log]#