Rsyslog Log Server Deployment-loganalyzer+mysql

Source: Internet
Author: User
Tags syslog import database rsyslog

Construction LNMP See

Http://liang-yao.cnblogs.com/p/8448362.html

Yum Install-y Rsyslog-mysql

Import Database

Mysql-u Root-p </usr/share/doc/rsyslog-7.4.7/mysql-createdb.sql

Available through RPM-QL Rsyslog-mysql | grep createdb Query Location

/usr/share/doc/rsyslog-7.4.7/mysql-createdb.sql

Create a user and grant permissions

Grant all on syslog.* to [e-mail protected] identified by ' 123456 ';

Refresh Permissions

Flush privileges;

Vim/etc/rsyslog.conf

# # # # MODULES # #

$ModLoad Ommysql

*.*:ommysql:localhost,syslog,rsyslogs,123456

Syslog is the database name, Rsyslogs is the user of the database, 123456 is the user password

$ModLoad Immark #immark是模块名, support log tagging

$ModLoad imtcp #支持TCP协议

$InputTCPServerRun 514 #打开514端口以接收日志

Systemctl Restart Rsyslog

Log-client Configuration

Vim/etc/rsyslog.conf

* * @@192.168.200.101:514

Systemctl Restart Rsyslog

Viewing logs on the Log-server

Cat/var/log/messages

02 is the log-client hostname (not the same host name)

Installing Loganalyzer

wget http://download.adiscon.com/loganalyzer/loganalyzer-4.1.5.tar.gz

Tar xzvf loganalyzer-4.1.5.tar.gz

CD loganalyzer-4.1.5/src/

Mkdir/usr/share/nginx/html/loganalyzer

MV */usr/share/nginx/html/loganalyzer

Chown-r nginx:nginx/usr/share/nginx/html/loganalyzer/*

Visit http://192.168.200.101/loganalyzer/

touch/usr/share/nginx/html/loganalyzer/config.php

chmod 666/usr/share/nginx/html/loganalyzer/config.php

Rsyslog Log Server Deployment-loganalyzer+mysql

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.