Advertisement
Guest User

Untitled

a guest
Feb 5th, 2023
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. # rsyslog configuration file
  2.  
  3. # For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
  4. # If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
  5.  
  6. #### MODULES ####
  7.  
  8. # The imjournal module bellow is now used as a message source instead of imuxsock.
  9. $ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
  10. $ModLoad imjournal # provides access to the systemd journal
  11. #$ModLoad imklog # reads kernel messages (the same are read from journald)
  12. #$ModLoad immark # provides --MARK-- message capability
  13.  
  14. # Provides UDP syslog reception
  15. $ModLoad imudp
  16. $UDPServerRun 514
  17.  
  18. # Provides TCP syslog reception
  19. $ModLoad imtcp
  20. $InputTCPServerRun 514
  21.  
  22.  
  23. #### GLOBAL DIRECTIVES ####
  24.  
  25. # Where to place auxiliary files
  26. $WorkDirectory /var/lib/rsyslog
  27.  
  28. # Use default timestamp format
  29. $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
  30.  
  31. # File syncing capability is disabled by default. This feature is usually not required,
  32. # not useful and an extreme performance hit
  33. #$ActionFileEnableSync on
  34.  
  35. # Include all config files in /etc/rsyslog.d/
  36. $IncludeConfig /etc/rsyslog.d/*.conf
  37.  
  38. # Turn off message reception via local log socket;
  39. # local messages are retrieved through imjournal now.
  40. $OmitLocalLogging on
  41.  
  42. # File to store the position in the journal
  43. $IMJournalStateFile imjournal.state
  44.  
  45.  
  46. #### RULES ####
  47.  
  48. # Log all kernel messages to the console.
  49. # Logging much else clutters up the screen.
  50. #kern.* /dev/console
  51. :syslogtag, contains, "nrgitho" /var/log/nrgitho.log
  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. # ### begin forwarding rule ###
  77. # The statement between the begin ... end define a SINGLE forwarding
  78. # rule. They belong together, do NOT split them. If you create multiple
  79. # forwarding rules, duplicate the whole block!
  80. # Remote Logging (we use TCP for reliable delivery)
  81. #
  82. # An on-disk queue is created for this action. If the remote host is
  83. # down, messages are spooled to disk and sent when it is up again.
  84. #$ActionQueueFileName fwdRule1 # unique name prefix for spool files
  85. #$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
  86. #$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
  87. #$ActionQueueType LinkedList # run asynchronously
  88. #$ActionResumeRetryCount -1 # infinite retries if host is down
  89. # remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
  90. #*.* @@remote-host:514
  91. # ### end of the forwarding rule ###
  92.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement