Install Rsyslog and LogAnalyzer on Centos 6
来源:互联网 发布:狸猫组态软件 编辑:程序博客网 时间:2024/06/01 08:00
Rsyslog and LogAnalyzerare tools that help administrators to collect the systems log in a centralized place and facilitates the data analysis.
In large networks the number of devices installed provides tons of logs that make impossible to have a good overview of the overall network status without having a centralized log collector system.
Prerequisites
- Centos 6.x minimal
- A working LAMP environment
- Rsyslog and LogAnalyzer packages
Install Rsyslog
First install LAMP environment and Rsyslog packages using the yum command.
# yum install httpd php mysql php-mysql mysql-server rsyslog rsyslog-mysql wget
Prior importing the db schema into MySQL you can customize the database name (Syslog by default) by editing the createDB.sql file.
# vi /usr/share/doc/rsyslog-mysql-5.8.10/createDB.sql
Once editing has been completed, import the db schema into MySQL. In the example, the procedure creates a new database called rsyslogdb.
# mysql -u root -p < /usr/share/doc/rsyslog-mysql-5.8.10/createDB.sql
Grant the privileges to the account rsyslog.
# mysql -u root -p
Edit the configuration file /etc/rsyslog.conf and enable the listed parameters.
$ModLoad imuxsock
# vi /etc/rsyslog.conf
Add also the following lines:
Enable the service to start at system boot and start the service.
# chkconfig rsyslog on
# service rsyslog restart
If you have a firewall, you need to open ports TCP 514 and UDP 514 to work with Rsyslog.
Test Rsyslog
To test if everything is working, check if messages are arriving at the syslog server.
# tail -f /var/log/messages
In addition you can check if messages are being stored in MySQL database.
# mysql -u root -p
If you see an empty set means it’s working.
Install LogAnalyzer
Using the command wget download the LogAnalyzer package.
# wget http://download.adiscon.com/loganalyzer/loganalyzer-3.6.3.tar.gz
Unpack the downloaded file and move the content to the Apache document root.
# tar -vxzf loganalyzer-3.6.3.tar.gz
# mv loganalyzer-3.6.3/src/ /var/www/html/loganalyzer
# mv loganalyzer-3.6.3/contrib/* /var/www/html/loganalyzer
Enter the created directory and assign the correct permissions to execute the scripts.
# cd /var/www/html/loganalyzer/
# chmod 744 configure.sh secure.sh
# ./configure.sh
Configure LogAnalyzer
Access the web interface typing from your browser the following address:
http://IP_address/loganalyzer
At first access you receive an error message because the application hasn’t been configured yet. Click on word here to go ahead with the configuration.
Click Next to start the installation.
Click Next to continue.
Enable Enable User Database option and enter the parameters set during the database creation.
Click Next.
If no errors are shown click Next to continue.
Create the Admin user typing the username and password then click Next.
Choose as Source Type the MYSQL Native value and enter the parameter of the database previously created. Click Next. Pay attention to the field Database Tablename where the value must be:
SystemEvents
Click Finish to complete the installation.
To login to LogAnalyzer you need to enter your credential then click Login.
The Rsyslog server shows the so far collected data. You need to set the network devices to send syslog messages to the Rsyslog server just configured to populate the Events.
Troubleshooting
After login you may receive the error message:
could not find the configured table, maybe misspelled or the table names are case sensitive
This error is often due to wrong syntax in the DBTableName field. To fix it you need to edit the /var/www/html/loganalyzer/config.php file and check if the DBTableName value is written with the correct capital letters.
SystemEvents
# vi /var/www/html/loganalyzer/config.php
Amended the DBTableName value, the system should work properly.
来源:http://nolabnoparty.com/en/install-rsyslog-loganalyzer/
- Install Rsyslog and LogAnalyzer on Centos 6
- How to Install RSyslog+MySQL with LogAnalyzer on CentOS
- Install and configure rsyslog Centralized logging server in CentOS 6.5
- CentOS 6.5下利用Rsyslog+LogAnalyzer+MySQL部署日志服务器
- CentOS 6.5下利用Rsyslog+LogAnalyzer+MySQL部署日志服务器
- CentOS 6.5+Rsyslog+LogAnalyzer搭建中央日志服务器
- CentOS 6.5+Rsyslog+LogAnalyzer搭建中央日志服务器
- CentOS 6.5下利用Rsyslog+LogAnalyzer+MySQL部署日志服务器
- CentOS 6.5下利用Rsyslog+LogAnalyzer+MySQL部署日志服务器
- CentOS 6.5下利用Rsyslog+LogAnalyzer+MySQL部署日志服务器
- CentOS 6.5下利用Rsyslog+LogAnalyzer+MySQL部署日志服务器
- CentOS 6.5下利用Rsyslog+LogAnalyzer+MySQL部署日志服务器
- CentOS 6.8下利用Rsyslog+LogAnalyzer+MySQL部署日志服务器
- Install and deploy rails on CentOS
- Git install and config on CentOS
- Install Haskell on Ubuntu and CentOS
- 04-Log rsyslog-mysql & loganalyzer
- CentOS 6.5下的lamp环境rsyslog+MySQL+loganalyzer实现日志集中分析管理
- Linux程序设计(Linux shell编程的例子:生成网页文件)
- 关于STM32在MDK环境下的宏定义设置
- Simultaneous Localization and Mapping (SLAM)讲义1
- hdu5210 Delete
- android-SDK更新推荐方法-by TomHawk
- Install Rsyslog and LogAnalyzer on Centos 6
- test
- ADO.Net知识整理
- ios 分页显示
- IoC模式
- (1.4.10) 迅雷2014校园招聘笔试题
- CSS 入门
- ZOJ 3870 - Team Formation(数学)
- Qt 实现的文本编辑器