Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. [root@server ~]# cat /etc/rsyslog.{conf,d/*}
  2. # rsyslog configuration file
  3.  
  4. # For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
  5. # If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
  6.  
  7. #### MODULES ####
  8.  
  9. # The imjournal module bellow is now used as a message source instead of imuxsoc k.
  10. $ModLoad imuxsock # provides support for local system logging (e.g. via logger c ommand)
  11. $ModLoad imjournal # provides access to the systemd journal
  12. #$ModLoad imklog # reads kernel messages (the same are read from journald)
  13. #$ModLoad immark # provides --MARK-- message capability
  14.  
  15. # Provides UDP syslog reception
  16. #$ModLoad imudp
  17. #$UDPServerRun 514
  18.  
  19. # Provides TCP syslog reception
  20. #$ModLoad imtcp
  21. #$InputTCPServerRun 514
  22.  
  23.  
  24. #### GLOBAL DIRECTIVES ####
  25.  
  26. # Where to place auxiliary files
  27. $WorkDirectory /var/lib/rsyslog
  28.  
  29. # Use default timestamp format
  30. $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
  31.  
  32. # File syncing capability is disabled by default. This feature is usually not re quired,
  33. # not useful and an extreme performance hit
  34. #$ActionFileEnableSync on
  35.  
  36. # Include all config files in /etc/rsyslog.d/
  37. $IncludeConfig /etc/rsyslog.d/*.conf
  38.  
  39. # Turn off message reception via local log socket;
  40. # local messages are retrieved through imjournal now.
  41. $OmitLocalLogging on
  42.  
  43. # File to store the position in the journal
  44. $IMJournalStateFile imjournal.state
  45.  
  46.  
  47. #### RULES ####
  48.  
  49. # Log all kernel messages to the console.
  50. # Logging much else clutters up the screen.
  51. #kern.* /dev/console
  52.  
  53. # Log anything (except mail) of level info or higher.
  54. # Don't log private authentication messages!
  55. *.info;mail.none;authpriv.none;cron.none /var/log/messages
  56.  
  57. # The authpriv file has restricted access.
  58. authpriv.* /var/log/secure
  59.  
  60. # Log all the mail messages in one place.
  61. mail.* -/var/log/maillog
  62.  
  63.  
  64. # Log cron stuff
  65. cron.* /var/log/cron
  66.  
  67. # Everybody gets emergency messages
  68. *.emerg :omusrmsg:*
  69.  
  70. # Save news errors of level crit and higher in a special file.
  71. uucp,news.crit /var/log/spooler
  72.  
  73. # Save boot messages also to boot.log
  74. local7.* /var/log/boot.log
  75.  
  76.  
  77. # ### begin forwarding rule ###
  78. # The statement between the begin ... end define a SINGLE forwarding
  79. # rule. They belong together, do NOT split them. If you create multiple
  80. # forwarding rules, duplicate the whole block!
  81. # Remote Logging (we use TCP for reliable delivery)
  82. #
  83. # An on-disk queue is created for this action. If the remote host is
  84. # down, messages are spooled to disk and sent when it is up again.
  85. #$ActionQueueFileName fwdRule1 # unique name prefix for spool files
  86. #$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
  87. #$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
  88. #$ActionQueueType LinkedList # run asynchronously
  89. #$ActionResumeRetryCount -1 # infinite retries if host is down
  90. # remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
  91. #*.* @@remote-host:514
  92. # ### end of the forwarding rule ###
  93. $SystemLogSocketName /run/systemd/journal/syslog
  94. [root@server ~]#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement