CENTOS6 on Rsyslog application (Rsyslog+mysql+loganalyzer)

Source: Internet
Author: User
Tags syslog import database rsyslog

1, configure the log server,
(1) Enable the function of the log server: (UDP and TCP open one can)

# provides UDP syslog reception
$ModLoad imudp--------turn on the UDP to start recording other machines
$UDPServerRun 514-------Monitor on port 514.

# provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514
After modifying, restart the following configuration file, service Rsyslog restart
(2) Turn on the server log on the client computer
Change the *.info;mail.none;authpriv.none;cron.none/var/log/messages into
*.info;mail.none;authpriv.none;cron.none @
After modifying, restart the following configuration file, service Rsyslog restart

2. Display log information through WebGui
Rsyslog+mysql+loganalyzer Configuration steps
Database configuration:
1. Installation: MySQL database ip:
#yum Install Rsyslog-mysql Mysql-server
2. Import the database
# RPM-QL Rsyslog-mysql
/USR/SHARE/DOC/RSYSLOG-MYSQL-5.8.10/CREATEDB.SQL------The format of this database (import it into the database)
(View database How to create Cat/usr/share/doc/rsyslog-mysql-5.8.10/createdb.sql)
#mysql </usr/share/doc/rsyslog-mysql-5.8.10/createdb.sql
3, authorized database remote login user
>grant all on syslog.* to [e-mail protected] ' 172.16.3.% ' identified by ' Ning ';
Client configuration file:
4, modify the client's configuration file ip:
$ModLoad ommysql---------------------------------Add enable modules
*.info;mail.none;authpriv.none;cron.none:ommysql:,syslog,ning,ning (Specifies the database name and data IP, remote login name and password)
#service rsyslog Restart----Restart Service
5. View log information (view Log on client)
Mysql-u ning-h
mysql> show databases;
| Database |
| Information_schema |
| Syslog----------------------automatically generated tables in the Import database
| Test |
3 Rows in Set (0.00 sec)
Mysql>use Syslog
Mysql> Show tables;
| Tables_in_syslog |
| SystemEvents |--------------The table where the log is stored
| systemeventsproperties |
2 rows in Set (0.01 sec)
Mysql>select * from SystemEvents;-------------View Log results
6, Configuration Loganalyzer

# yum-y Install httpd php php-mysql PHP-GD
# Tar XF loganalyzer-3.6.5.tar.gz
# Mkdir/var/www/html/log
# CP loganalyzer-3.6.5/src/*/var/www/html/log
# CP loganalyzer-3.6.5/contrib/*/var/www/html/log
# Cd/var/www/html/log
# chmod +x configure.sh secure.sh
# chmod 666 config.php
# chown-r Apache.apache./*

7. Test:
There's a picture of the truth

650) this.width=650; "Style=" border-bottom:0px; border-left:0px; border-top:0px; border-right:0px "title=" Rsyslog "border=" 0 "alt=" rsyslog "src=" http://img1.51cto.com/attachment/201408/20/1384120 _1408551839ahjc.jpg "" 1032 "height=" 381 "/>

650) this.width=650; "Style=" border-bottom:0px; border-left:0px; border-top:0px; border-right:0px "title=" "border=" 0 "alt=" src= "http://img1.51cto.com/attachment/201408/20/1384120_" 1408551841adxi.jpg "" 1002 "height=" 665 "/>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.