rsyslog.conf 3.2 KB

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