rsyslog.conf 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. #### MODULES ####
  7. #################
  8. $ModLoad imuxsock # provides support for local system logging
  9. $ModLoad imklog # provides kernel logging support
  10. #$ModLoad immark # provides --MARK-- message capability
  11. $SystemLogRateLimitInterval 1
  12. $SystemLogRateLimitBurst 1000
  13. # provides UDP syslog reception
  14. #$ModLoad imudp
  15. #$UDPServerRun 514
  16. # provides TCP syslog reception
  17. #$ModLoad imtcp
  18. #$InputTCPServerRun 514
  19. ###########################
  20. #### GLOBAL DIRECTIVES ####
  21. ###########################
  22. #
  23. # Use traditional timestamp format.
  24. # To enable high precision timestamps, comment out the following line.
  25. #
  26. $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
  27. #
  28. # Set the default permissions for all log files.
  29. #
  30. $FileOwner root
  31. $FileGroup adm
  32. $FileCreateMode 0640
  33. $DirCreateMode 0755
  34. $Umask 0022
  35. #
  36. # Where to place spool and state files
  37. #
  38. $WorkDirectory /var/spool/rsyslog
  39. #
  40. # Include all config files in /etc/rsyslog.d/
  41. #
  42. $IncludeConfig /etc/rsyslog.d/*.conf
  43. ###############
  44. #### RULES ####
  45. ###############
  46. #
  47. # First some standard log files. Log by facility.
  48. #
  49. auth,authpriv.* /var/log/auth.log
  50. *.*;auth,authpriv.none;\
  51. local6.none -/var/log/syslog
  52. #cron.* /var/log/cron.log
  53. daemon.* -/var/log/daemon.log
  54. kern.* -/var/log/kern.log
  55. lpr.* -/var/log/lpr.log
  56. mail.* -/var/log/mail.log
  57. user.* -/var/log/user.log
  58. local6.* /var/log/hello/hello.log
  59. #
  60. # Logging for the mail system. Split it up so that
  61. # it is easy to write scripts to parse these files.
  62. #
  63. mail.info -/var/log/mail.info
  64. mail.warn -/var/log/mail.warn
  65. mail.err /var/log/mail.err
  66. #
  67. # Logging for INN news system.
  68. #
  69. news.crit /var/log/news/news.crit
  70. news.err /var/log/news/news.err
  71. news.notice -/var/log/news/news.notice
  72. #
  73. # Some "catch-all" log files.
  74. #
  75. *.=debug;\
  76. auth,authpriv.none;\
  77. news.none;mail.none;local7.none -/var/log/debug
  78. *.=info;*.=notice;*.=warn;\
  79. auth,authpriv.none;\
  80. cron,daemon.none;\
  81. mail,news.none;local7.none -/var/log/messages
  82. #
  83. # Emergencies are sent to everybody logged in.
  84. #
  85. *.emerg :omusrmsg:*
  86. #
  87. # I like to have messages displayed on the console, but only on a virtual
  88. # console I usually leave idle.
  89. #
  90. #daemon,mail.*;\
  91. # news.=crit;news.=err;news.=notice;\
  92. # *.=debug;*.=info;\
  93. # *.=notice;*.=warn /dev/tty8
  94. # The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
  95. # you must invoke `xconsole' with the `-file' option:
  96. #
  97. # $ xconsole -file /dev/xconsole [...]
  98. #
  99. # NOTE: adjust the list below, or you'll go crazy if you have a reasonably
  100. # busy site..
  101. #
  102. daemon.*;mail.*;\
  103. news.err;\
  104. *.=debug;*.=info;\
  105. *.=notice;*.=warn |/dev/xconsole