rsyslog.conf 2.7 KB

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