Detailed Rsyslog+loganalyzer+evtsys to build centralized monitoring system

Source: Internet
Author: User
Tags config mail mysql syslog rsyslog

First, the installation of the service side

Yum source New, if any, you can omit

# cat >>/etc/yum.repos.d/sohu.repo <<eof 
[Sohu] 
Name=sohu ' s mirrors 
baseurl=http:// mirrors.sohu.com/centos/5/os/x86_64/ 
enabled=1 
gpgcheck=0 
EOF

Install lamp environment and rsyslog, if have lamp, only need to install Rsyslog Rsyslog-mysql can

Yum install rsyslog rsyslog-mysql mysql mysql-devel mysql-server php php-mysql php-pdo Php-common php-gd

Import Rsyslog Database

Mysql-u Root-p < $ (RPM-QL rsyslog-mysql | grep sql$)

Create a database user

Mysql-u root-p 
mysql> Grant all privileges on syslog.* to logger@localhost identified by ' logger '; 
mysql> flush Privileges; 
Mysql> exit;

Modifying the Rsyslog configuration file

# vi/etc/rsyslog.conf//Modify it can be # Use traditional timestamp format $ActionFileDefaultTemplate Rsyslog_traditionalfi  Leformat # provides kernel logging support (previously do by RKLOGD) # provides to Local system support (e.g. via logger command) $ModLoad immark $ModLoad imuxsock $ModLoad imklog $ModLoad ommysql *.*: ommysql:127. 
0.0.1,syslog,logger,logger $ModLoad imudp.so $UDPServerRun 514 # Log All kernel messages to the console. 
# Logging Much else clutters up the screen. #kern. */dev/console # Log anything (except mail) of level info or higher 
. 
# Don ' t log private authentication messages! 
*.info;mail.none;authpriv.none;cron.none/var/log/messages # The Authpriv file has restricted access. 
authpriv.*/var/log/secure # Log all of the mail messages in one place. Mail.*-/var/Log/maillog # Log Cron Stuff cron.*/var/log/cron # everybody GE TS Emergency Messages *.emerg * # Save News errors of level crit and HIG 
Her in a special file. Uucp,news.crit/var/log/spooler # Save Boot messages also to Boot.log Loc al7.*/var/log/boot.log

The red part is added, the other contrast, some skip, not the add it.

Install Loganalyzer

# wget http://download.adiscon.com/loganalyzer/loganalyzer-3.6.3.tar.gz 
# tar XF loganalyzer-3.6.3.tar.gz 
# Mkdir/var/www/html/loganalyzer 
# mv loganalyzer-3.6.3/src/*/var/www/html/loganalyze 
# touch/var/www/html/ loganalyzer/config.php 
# chmod 666/var/www/html/loganalyzer/config.php

You can install it through a browser

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.