FamiHug

rsyslog config

Mar 12th, 2013
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.89 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 imfile
  16. #$ModLoad immark # provides --MARK-- message capability
  17.  
  18. # provides UDP syslog reception
  19. #$ModLoad imudp
  20. #$UDPServerRun 514
  21.  
  22. # provides TCP syslog reception
  23. #$ModLoad imtcp
  24. #$InputTCPServerRun 514
  25.  
  26.  
  27. ###########################
  28. #### GLOBAL DIRECTIVES ####
  29. ###########################
  30.  
  31. #
  32. # Use traditional timestamp format.
  33. # To enable high precision timestamps, comment out the following line.
  34. #
  35. $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
  36.  
  37. # Filter duplicated messages
  38. $RepeatedMsgReduction on
  39.  
  40. #
  41. # Set the default permissions for all log files.
  42. #
  43. $FileOwner syslog
  44. $FileGroup adm
  45. $FileCreateMode 0640
  46. $DirCreateMode 0755
  47. $Umask 0022
  48. $PrivDropToUser syslog
  49. $PrivDropToGroup syslog
  50.  
  51. #
  52. # Where to place spool files
  53. #
  54. $WorkDirectory /var/spool/rsyslog
  55.  
  56. #
  57. # Include all config files in /etc/rsyslog.d/
  58. #
  59. $IncludeConfig /etc/rsyslog.d/*.conf
  60.  
  61.  
  62.  
  63. ==================== rsyslog.d=====================
  64. ==> 20-ufw.conf <==
  65. # Log kernel generated UFW log messages to file
  66. :msg,contains,"[UFW " /var/log/ufw.log
  67.  
  68. # Uncomment the following to stop logging anything that matches the last rule.
  69. # Doing this will stop logging kernel generated UFW log messages to the file
  70. # normally containing kern.* messages (eg, /var/log/kern.log)
  71. #& ~
  72.  
  73. ==> 50-default.conf <==
  74. # Default rules for rsyslog.
  75. #
  76. # For more information see rsyslog.conf(5) and /etc/rsyslog.conf
  77.  
  78. #
  79. # First some standard log files. Log by facility.
  80. #
  81. auth,authpriv.* /var/log/auth.log
  82. *.*;auth,authpriv.none -/var/log/syslog
  83. #cron.* /var/log/cron.log
  84. #daemon.* -/var/log/daemon.log
  85. kern.* -/var/log/kern.log
  86. #lpr.* -/var/log/lpr.log
  87. mail.* -/var/log/mail.log
  88. #user.* -/var/log/user.log
  89.  
  90. #
  91. # Logging for the mail system. Split it up so that
  92. # it is easy to write scripts to parse these files.
  93. #
  94. #mail.info -/var/log/mail.info
  95. #mail.warn -/var/log/mail.warn
  96. mail.err /var/log/mail.err
  97.  
  98. #
  99. # Logging for INN news system.
  100. #
  101. news.crit /var/log/news/news.crit
  102. news.err /var/log/news/news.err
  103. news.notice -/var/log/news/news.notice
  104.  
  105. #
  106. # Some "catch-all" log files.
  107. #
  108. #*.=debug;\
  109. # auth,authpriv.none;\
  110. # news.none;mail.none -/var/log/debug
  111. #*.=info;*.=notice;*.=warn;\
  112. # auth,authpriv.none;\
  113. # cron,daemon.none;\
  114. # mail,news.none -/var/log/messages
  115.  
  116. #
  117. # Emergencies are sent to everybody logged in.
  118. #
  119. *.emerg :omusrmsg:*
  120.  
  121. #
  122. # I like to have messages displayed on the console, but only on a virtual
  123. # console I usually leave idle.
  124. #
  125. #daemon,mail.*;\
  126. # news.=crit;news.=err;news.=notice;\
  127. # *.=debug;*.=info;\
  128. # *.=notice;*.=warn /dev/tty8
  129.  
  130. # The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
  131. # you must invoke `xconsole' with the `-file' option:
  132. #
  133. # $ xconsole -file /dev/xconsole [...]
  134. #
  135. # NOTE: adjust the list below, or you'll go crazy if you have a reasonably
  136. # busy site..
  137. #
  138. daemon.*;mail.*;\
  139. news.err;\
  140. *.=debug;*.=info;\
  141. *.=notice;*.=warn |/dev/xconsole
  142.  
  143. ==> fromfile.conf <==
  144. $InputFileName /var/log/nginx/access.log
  145. $InputFileTag nginxaccess:
  146. $InputFileStateFile nginx-access
  147. $InputFileSeverity error
  148. $InputFileFacility local7
  149. $InputRunFileMonitor
  150. $InputFilePollInterval 10
  151.  
  152. ==> postfix.conf <==
  153. # Create an additional socket in postfix's chroot in order not to break
  154. # mail logging when rsyslog is restarted. If the directory is missing,
  155. # rsyslog will silently skip creating the socket.
  156. $AddUnixListenSocket /var/spool/postfix/dev/log
Advertisement
Add Comment
Please, Sign In to add comment