Advertisement
Guest User

Untitled

a guest
Apr 4th, 2012
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. # /etc/rsyslog.conf Configuration file for rsyslog.
  2. #
  3. # For more information see
  4. # /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
  5. #
  6. # Default logging rules can be found in /etc/rsyslog.d/50-default.conf
  7.  
  8.  
  9. #################
  10. #### MODULES ####
  11. #################
  12.  
  13. $ModLoad imuxsock # provides support for local system logging
  14. $ModLoad imklog # provides kernel logging support (previously done by rklogd)
  15. #$ModLoad immark # provides --MARK-- message capability
  16.  
  17. $KLogPath /proc/kmsg
  18.  
  19. # provides UDP syslog reception
  20. #$ModLoad imudp
  21. #$UDPServerRun 514
  22.  
  23. # provides TCP syslog reception
  24. $ModLoad imtcp
  25. $InputTCPServerRun 514
  26.  
  27.  
  28. ###########################
  29. #### GLOBAL DIRECTIVES ####
  30. ###########################
  31.  
  32. #
  33. # Use traditional timestamp format.
  34. # To enable high precision timestamps, comment out the following line.
  35. #
  36. $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
  37.  
  38. # Filter duplicated messages
  39. $RepeatedMsgReduction on
  40.  
  41. #
  42. # Set the default permissions for all log files.
  43. #
  44. $FileOwner syslog
  45. $FileGroup adm
  46. $FileCreateMode 0640
  47. $DirCreateMode 0755
  48. $Umask 0022
  49. $PrivDropToUser syslog
  50. $PrivDropToGroup syslog
  51.  
  52. #
  53. # Include all config files in /etc/rsyslog.d/
  54. #
  55. $IncludeConfig /etc/rsyslog.d/*.conf
  56.  
  57. ###########################################
  58. ###########################################
  59. # CONTENTS OF /etc/rsyslog.d/10-remote.conf
  60. ###########################################
  61. ###########################################
  62.  
  63. $template RemoteDailyLog,"/var/log/remote/%hostname%/%fromhost-ip%/%$year%/%$month%/%$day%.log"
  64. :fromhost-ip, !isequal, "127.0.0.1" -?RemoteDailyLog
  65. & ~
  66.  
  67. ############################################
  68. ############################################
  69. # CONTENTS OF /etc/rsyslog.d/50-default.conf
  70. ############################################
  71. ############################################
  72.  
  73. # Default rules for rsyslog.
  74. #
  75. # For more information see rsyslog.conf(5) and /etc/rsyslog.conf
  76.  
  77. #
  78. # First some standard log files. Log by facility.
  79. #
  80. auth,authpriv.* /var/log/auth.log
  81. *.*;auth,authpriv.none -/var/log/syslog
  82. #cron.* /var/log/cron.log
  83. daemon.* -/var/log/daemon.log
  84. kern.* -/var/log/kern.log
  85. lpr.* -/var/log/lpr.log
  86. mail.* -/var/log/mail.log
  87. user.* -/var/log/user.log
  88.  
  89. #
  90. # Logging for the mail system. Split it up so that
  91. # it is easy to write scripts to parse these files.
  92. #
  93. mail.info -/var/log/mail.info
  94. mail.warn -/var/log/mail.warn
  95. mail.err /var/log/mail.err
  96.  
  97. #
  98. # Logging for INN news system.
  99. #
  100. news.crit /var/log/news/news.crit
  101. news.err /var/log/news/news.err
  102. news.notice -/var/log/news/news.notice
  103.  
  104. #
  105. # Some "catch-all" log files.
  106. #
  107. *.=debug;\
  108. auth,authpriv.none;\
  109. news.none;mail.none -/var/log/debug
  110. *.=info;*.=notice;*.=warn;\
  111. auth,authpriv.none;\
  112. cron,daemon.none;\
  113. mail,news.none -/var/log/messages
  114.  
  115. #
  116. # Emergencies are sent to everybody logged in.
  117. #
  118. *.emerg *
  119.  
  120. #
  121. # I like to have messages displayed on the console, but only on a virtual
  122. # console I usually leave idle.
  123. #
  124. #daemon,mail.*;\
  125. # news.=crit;news.=err;news.=notice;\
  126. # *.=debug;*.=info;\
  127. # *.=notice;*.=warn /dev/tty8
  128.  
  129. # The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
  130. # you must invoke `xconsole' with the `-file' option:
  131. #
  132. # $ xconsole -file /dev/xconsole [...]
  133. #
  134. # NOTE: adjust the list below, or you'll go crazy if you have a reasonably
  135. # busy site..
  136. #
  137. daemon.*;mail.*;\
  138. news.err;\
  139. *.=debug;*.=info;\
  140. *.=notice;*.=warn |/dev/xconsole
  141.  
  142. #########################################
  143. #########################################
  144. # CONTENTS OF /etc/rsyslog.d/postfix.conf
  145. #########################################
  146. #########################################
  147.  
  148. # Create an additional socket in postfix's chroot in order not to break
  149. # mail logging when rsyslog is restarted. If the directory is missing,
  150. # rsyslog will silently skip creating the socket.
  151. $AddUnixListenSocket /var/spool/postfix/dev/log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement