우분투 rsyslog.conf 편집하기

경고: 로그인하지 않았습니다. 편집을 하면 IP 주소가 공개되게 됩니다. 로그인하거나 계정을 생성하면 편집자가 사용자 이름으로 기록되고, 다른 장점도 있습니다.

편집을 취소할 수 있습니다. 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 게시해주세요.

최신판 당신의 편집
1번째 줄: 1번째 줄:
==개요==
==개요==
;/etc/rsyslog.conf
;/etc/rsyslog.conf
* [[rsyslog]] 설정 파일
;rsyslog.conf
*[[syslog]] 설정 파일
*[[rsyslog]] 또는 [[sysklogd]]의 설정 파일


==우분투 16==
==내용==
<syntaxhighlight lang='aconf'>
<source lang='bash'>
# /etc/rsyslog.conf Configuration file for rsyslog.
# rsyslog v5 configuration file
#
# For more information see
# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
#
#  Default logging rules can be found in /etc/rsyslog.d/50-default.conf


# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html


#################
#### MODULES ####
#### MODULES ####
#################


module(load="imuxsock") # provides support for local system logging
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
module(load="imklog")   # provides kernel logging support
$ModLoad imklog  # provides kernel logging support (previously done by rklogd)
#module(load="immark") # provides --MARK-- message capability
#$ModLoad immark  # provides --MARK-- message capability


# provides UDP syslog reception
# Provides UDP syslog reception
#module(load="imudp")
#$ModLoad imudp
#input(type="imudp" port="514")
#$UDPServerRun 514


# provides TCP syslog reception
# Provides TCP syslog reception
#module(load="imtcp")
#$ModLoad imtcp
#input(type="imtcp" port="514")
#$InputTCPServerRun 514


# Enable non-kernel facility klog messages
$KLogPermitNonKernelFacility on


###########################
#### GLOBAL DIRECTIVES ####
#### GLOBAL DIRECTIVES ####
###########################


#
# Use default timestamp format
# Use traditional timestamp format.
# To enable high precision timestamps, comment out the following line.
#
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat


# Filter duplicated messages
# File syncing capability is disabled by default. This feature is usually not required,
$RepeatedMsgReduction on
# not useful and an extreme performance hit
#$ActionFileEnableSync on


#
# Set the default permissions for all log files.
#
$FileOwner syslog
$FileGroup adm
$FileCreateMode 0640
$DirCreateMode 0755
$Umask 0022
$PrivDropToUser syslog
$PrivDropToGroup syslog
#
# Where to place spool and state files
#
$WorkDirectory /var/spool/rsyslog
#
# Include all config files in /etc/rsyslog.d/
# Include all config files in /etc/rsyslog.d/
#
$IncludeConfig /etc/rsyslog.d/*.conf
$IncludeConfig /etc/rsyslog.d/*.conf
</syntaxhighlight>


==우분투 14==
<syntaxhighlight lang='aconf'>
#  /etc/rsyslog.conf Configuration file for rsyslog.
#
# For more information see
# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
#
#  Default logging rules can be found in /etc/rsyslog.d/50-default.conf


#### RULES ####


#################
# Log all kernel messages to the console.
#### MODULES ####
# Logging much else clutters up the screen.
#################
#kern.*                                                /dev/console


$ModLoad imuxsock # provides support for local system logging
# Log anything (except mail) of level info or higher.
$ModLoad imklog  # provides kernel logging support
# Don't log private authentication messages!
#$ModLoad immark  # provides --MARK-- message capability
*.info;mail.none;authpriv.none;cron.none                /var/log/messages


# provides UDP syslog reception
# The authpriv file has restricted access.
#$ModLoad imudp
authpriv.*                                              /var/log/secure
#$UDPServerRun 514


# provides TCP syslog reception
# Log all the mail messages in one place.
#$ModLoad imtcp
mail.*                                                  -/var/log/maillog
#$InputTCPServerRun 514


# Enable non-kernel facility klog messages
$KLogPermitNonKernelFacility on


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


#
# Everybody gets emergency messages
# Use traditional timestamp format.
*.emerg                                                *
# To enable high precision timestamps, comment out the following line.
#
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat


# Filter duplicated messages
# Save news errors of level crit and higher in a special file.
$RepeatedMsgReduction on
uucp,news.crit                                          /var/log/spooler


#
# Save boot messages also to boot.log
# Set the default permissions for all log files.
local7.*                                                /var/log/boot.log
#
$FileOwner syslog
$FileGroup adm
$FileCreateMode 0640
$DirCreateMode 0755
$Umask 0022
$PrivDropToUser syslog
$PrivDropToGroup syslog


#
# Where to place spool and state files
#
$WorkDirectory /var/spool/rsyslog


# ### begin forwarding rule ###
# The statement between the begin ... end define a SINGLE forwarding
# rule. They belong together, do NOT split them. If you create multiple
# forwarding rules, duplicate the whole block!
# Remote Logging (we use TCP for reliable delivery)
#
#
# Include all config files in /etc/rsyslog.d/
# An on-disk queue is created for this action. If the remote host is
#
# down, messages are spooled to disk and sent when it is up again.
$IncludeConfig /etc/rsyslog.d/*.conf
#$WorkDirectory /var/lib/rsyslog # where to place spool files
</syntaxhighlight>
#$ActionQueueFileName fwdRule1 # unique name prefix for spool files
#$ActionQueueMaxDiskSpace 1g  # 1gb space limit (use as much as possible)
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
#$ActionQueueType LinkedList  # run asynchronously
#$ActionResumeRetryCount -1    # infinite retries if host is down
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
#*.* @@remote-host:514
# ### end of the forwarding rule ###
</source>


==같이 보기==
==같이 보기==
* [[CentOS rsyslog.conf]]
*[[rsyslog]]
* [[우분투 rsyslog 서버 설정]]
*[[/var/log/messages]]
* [[rsyslog]]
*[[/var/log/secure]]
* [[syslog.conf, rsyslog.conf]]
*[[/var/log/maillog]]
*[[/var/log/cron]]
*[[/var/log/spooler]]
*[[/var/log/boot.log]]


[[분류: rsyslog]]
[[분류: /etc]]
[[분류: /etc]]
[[분류: .conf]]

제타위키에서의 모든 기여는 크리에이티브 커먼즈 저작자표시-동일조건변경허락 3.0 라이선스로 배포된다는 점을 유의해 주세요(자세한 내용에 대해서는 제타위키:저작권 문서를 읽어주세요). 만약 여기에 동의하지 않는다면 문서를 저장하지 말아 주세요.
또한, 직접 작성했거나 퍼블릭 도메인과 같은 자유 문서에서 가져왔다는 것을 보증해야 합니다. 저작권이 있는 내용을 허가 없이 저장하지 마세요!

취소 편집 도움말 (새 창에서 열림)