Advertisement
Guest User

Untitled

a guest
Dec 21st, 2022
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. cat /etc/rsyslog.conf
  2. # /etc/rsyslog.conf Configuration file for rsyslog.
  3. #
  4. # For more information see
  5. # /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
  6. #
  7. # Default logging rules can be found in /etc/rsyslog.d/50-default.conf
  8.  
  9.  
  10. #################
  11. #### MODULES ####
  12. #################
  13.  
  14. module(load="imuxsock") # provides support for local system logging
  15. #module(load="immark") # provides --MARK-- message capability
  16.  
  17. # provides UDP syslog reception
  18. #module(load="imudp")
  19. #input(type="imudp" port="514")
  20.  
  21. # provides TCP syslog reception
  22. #module(load="imtcp")
  23. #input(type="imtcp" port="514")
  24.  
  25. # provides kernel logging support and enable non-kernel klog messages
  26. module(load="imklog" permitnonkernelfacility="on")
  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. # Where to place spool and state files
  54. #
  55. $WorkDirectory /var/spool/rsyslog
  56.  
  57. #
  58. # Include all config files in /etc/rsyslog.d/
  59. #
  60. $IncludeConfig /etc/rsyslog.d/*.conf
  61. Enable Remote Logging
  62. *.* @XXX.XXX.XXX.XXX
  63.  
  64. -------------
  65.  
  66. Here is /etc/rsyslog.d/50-default.conf
  67.  
  68. cat 50-default.conf
  69. # Default rules for rsyslog.
  70. #
  71. # For more information see rsyslog.conf(5) and /etc/rsyslog.conf
  72.  
  73. #
  74. # First some standard log files. Log by facility.
  75. #
  76. auth,authpriv.* /var/log/auth.log
  77. *.*;auth,authpriv.none -/var/log/syslog
  78. #cron.* /var/log/cron.log
  79. #daemon.* -/var/log/daemon.log
  80. kern.* -/var/log/kern.log
  81. #lpr.* -/var/log/lpr.log
  82. mail.* -/var/log/mail.log
  83. #user.* -/var/log/user.log
  84.  
  85. #
  86. # Logging for the mail system. Split it up so that
  87. # it is easy to write scripts to parse these files.
  88. #
  89. #mail.info -/var/log/mail.info
  90. #mail.warn -/var/log/mail.warn
  91. mail.err /var/log/mail.err
  92.  
  93. #
  94. # Some "catch-all" log files.
  95. #
  96. #*.=debug;\
  97. # auth,authpriv.none;\
  98. # news.none;mail.none -/var/log/debug
  99. #*.=info;*.=notice;*.=warn;\
  100. # auth,authpriv.none;\
  101. # cron,daemon.none;\
  102. # mail,news.none -/var/log/messages
  103.  
  104. #
  105. # Emergencies are sent to everybody logged in.
  106. #
  107. *.emerg :omusrmsg:*
  108.  
  109. #
  110. # I like to have messages displayed on the console, but only on a virtual
  111. # console I usually leave idle.
  112. #
  113. #daemon,mail.*;\
  114. # news.=crit;news.=err;news.=notice;\
  115. # *.=debug;*.=info;\
  116. # *.=notice;*.=warn /dev/tty8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement