Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. # /etc/rsyslog.conf configuration file for rsyslog
  2. #
  3. # For more information install rsyslog-doc and see
  4. # /usr/share/doc/rsyslog-doc/html/configuration/index.html
  5.  
  6.  
  7. #################
  8. #### MODULES ####
  9. #################
  10.  
  11. module(load="imuxsock") # provides support for local system logging
  12. module(load="imklog") # provides kernel logging support
  13. module(load="immark") # provides --MARK-- message capability
  14.  
  15. # provides UDP syslog reception
  16. #module(load="imudp")
  17. #input(type="imudp" port="514")
  18.  
  19. # provides TCP syslog reception
  20. #module(load="imtcp")
  21. #input(type="imtcp" port="514")
  22.  
  23.  
  24. ###########################
  25. #### GLOBAL DIRECTIVES ####
  26. ###########################
  27.  
  28. #
  29. # Use traditional timestamp format.
  30. # To enable high precision timestamps, comment out the following line.
  31. #
  32. $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
  33.  
  34. #
  35. # Set the default permissions for all log files.
  36. #
  37. $FileOwner root
  38. $FileGroup adm
  39. $FileCreateMode 0777
  40. $DirCreateMode 0777
  41. $Umask 0022
  42.  
  43. #
  44. # Where to place spool and state files
  45. #
  46. $WorkDirectory /var/spool/rsyslog
  47.  
  48. #
  49. # Include all config files in /etc/rsyslog.d/
  50. #
  51. $IncludeConfig /etc/rsyslog.d/*.conf
  52.  
  53.  
  54. ###############
  55. #### RULES ####
  56. ###############
  57. *.=info /var/log/info.log
  58. & stop
  59.  
  60. if $msg contains 'bookstore' and $syslogseverity != 6 and $timestamp % 86400 >= 28800 and $timestamp % 86400 <= 57600 then /var/log/bookstore.log
  61. if $msg contains 'bookstore' and $syslogseverity != 6 and ($timestamp % 86400 < 28800 or $timestamp % 86400 > 57600) then /var/log/afterhours.log
  62. kern.* /var/log/kern.log
  63. auth.* /var/log/auth.log
  64. *.*;auth,authpriv,kern.none /var/log/syslog
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement