Rsyslog installation Configuration

Source: Internet
Author: User
Tags syslog rsyslog

4.1 Check if the Rsyslog software is installed

# Rpm-qa|grep Rsyslog//The software is installed on the default system

4.2 Installing Rsyslog modules connected to MySQL database

# yum Install Rsyslog-mysql–y

Rsyslog-mysql a module for Rsyslog to send logs to the MySQL database, which must be installed.

5.1 Importing Rsyslog-mysql database files

# cd/usr/share/doc/rsyslog-mysql-5.8.10/

# mysql-uroot-pabc123 < Createdb.sql

5.2 Create Rsyslog user rights under MySQL

# mysql-uroot–p

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

mysql> flush Privileges;

Mysql> exit

5.3 Configure the service side to support the Rsyslog-mysql module and turn on the UDP service port to get other Linux system logs in the network

# vi/etc/rsyslog.conf

$ModLoad Ommysql

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

Add the top two lines under # # # # MODULES # # # #

Description: localhost indicates a local host, Syslog is the database name, Rsyslog is the user of the database, and 123456 is the user password.

5.4 Opening the relevant log module

# vi/etc/rsyslog.conf

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

$ModLoad imudp #imupd是模块名, support UDP protocol

$UDPServerRun 514 #允许514端口接收使用UDP和TCP协议转发过来的日志

5.5 Restart Rsyslog Service

#/etc/init.d/rsyslog Restart

Systemctl Restart Rsyslog

=================================

Log Client under Window ( sent to rsyslog):evtsys

Evtsys-i-H 192.168.190.199-l 3 Client Installation

Evtsys-u Client Offload

-H: Specify the syslog server

-l option to send log information above the specified level:

0=all/verbose, 1=critical, 2=error, 3=warning, 4=info

Generate log information manually (for testing) under Windows:

eventcreate/t error/id 1000/l application/d "error message "

Rsyslog installation Configuration

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.