Linux Centralized log server Rsyslog

Source: Internet
Author: User
Tags rsyslog

Linux can usually be rsyslog to achieve centralized management of the system log, in which case there will usually be a log server, and then each machine configures its own log through the Rsyslog to write to the remote log server.

This assumes that there are two servers, one for the system log server (such as machine name Logmaster), and the other as a log client (such as machine name Logclient)

Log server Configuration

First modify the/etc/rsyslog.conf file on the log master machine to remove the comments from the four lines below

$ModLoad imudp$UDPServerRun514$ModLoad imtcp$InputTCPServerRun514

Then restart the RSYSLOGD service

sudo /etc/init.d/rsyslog restart
Log Client Configuration

Modify the/etc/rsyslog.conf file on the log node machine
In the end, add the following line to allow Linux to write a log at the same time to write a copy to the remote log Mater machine

*.*         @logmaster

Then restart the RSYSLOGD service

sudo /etc/init.d/rsyslog restart
Test

On Linxu, you can use the Logger command to write a system log, such as

$ ‘hello world‘

Then look at the/var/log/messages file on the log master machine and you can see something like this

Jun 28 14:58:16logclientroothelloworld

This includes the date, log source (machine name), process name, and log content.

Please indicate this address in the form of a link.
This address: http://blog.csdn.net/kongxx/article/details/46671575

Linux Centralized log server Rsyslog

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.