Difference between revisions of "Rsyslog Client"

From The Linux Source
Jump to: navigation, search
(Created page with "=== Client rsyslog Setup === 1. /etc/rsyslog.conf, add @sys.log.server.ip lines to logging section, ex; # Log all kernel messages to the console. # Logging much else clutte...")
 
Line 1: Line 1:
===  Client rsyslog Setup ===
 
 
1. /etc/rsyslog.conf, add @sys.log.server.ip lines to logging section, ex;
 
1. /etc/rsyslog.conf, add @sys.log.server.ip lines to logging section, ex;
 
  # Log all kernel messages to the console.
 
  # Log all kernel messages to the console.
Line 20: Line 19:
 
  # Everybody gets emergency messages
 
  # Everybody gets emergency messages
 
  *.emerg                                                *
 
  *.emerg                                                *
 +
 +
# Save news errors of level crit and higher in a special file.
 +
uucp,news.crit                                          /var/log/spooler
 +
 +
# Save boot messages also to boot.log
 +
local7.*                                                /var/log/boot.log
 +
 +
# centralized logging
 +
*.* @172.160.135.160:514
 +
 +
2. Restart rsyslog service
 +
ENT 7
 +
# systemctl restart rsyslog
 +
BEFORE Ent 7
 +
# service rsyslog restart

Revision as of 15:19, 19 May 2017

1. /etc/rsyslog.conf, add @sys.log.server.ip lines to logging section, ex;

# 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 the mail messages in one place.
mail.*                                                  -/var/log/maillog

# Log cron stuff
cron.*                                                  /var/log/cron

# Everybody gets emergency messages
*.emerg                                                 *

# Save news errors of level crit and higher in a special file.
uucp,news.crit                                          /var/log/spooler

# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log

# centralized logging
*.* @172.160.135.160:514

2. Restart rsyslog service

ENT 7
# systemctl restart rsyslog
BEFORE Ent 7
# service rsyslog restart