| # |
| {%- set config = salt['pillar.get']('rsyslog', {}) %} |
| # |
| # |
| # |
| # |
| # |
| # |
| # |
| # |
| # |
| # |
| # |
| # |
| # |
|
|
| # |
| # |
| # An on-disk queue is created for this action. If the remote host is |
| # down, messages are spooled to disk and sent when it is up again. |
| # |
| {%- if config.imjournal|default(false) %} |
| $WorkDirectory {{ config.get('workingdirectory', '/var/spool/rsyslog') }} |
| $ActionQueueFileName uniqName |
| $ActionQueueMaxDiskSpace 1g |
| $ActionQueueSaveOnShutdown on |
| $ActionQueueType LinkedList |
| $ActionResumeRetryCount -1 |
| {%- else %} |
| #$WorkDirectory /var/spool/rsyslog |
| #$ActionQueueFileName uniqName |
| #$ActionQueueMaxDiskSpace 1g |
| #$ActionQueueSaveOnShutdown on |
| #$ActionQueueType LinkedList |
| #$ActionResumeRetryCount -1 |
| {%- endif %} |
|
|
| # |
|
|
| # Remote Logging using TCP for reliable delivery |
| # remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional |
| {%- if config.target|default(false) and config.protocol == 'tcp' %} |
| *.* @@{{ config.target }} |
| {%- else %} |
| #*.* @@remote-host |
| {%- endif %} |
|
|
| # Remote Logging using UDP |
| # remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional |
| {%- if config.target|default(false) and config.protocol == 'udp' %} |
| *.* @{{ config.target }} |
| {%- else %} |
| #*.* @remote-host |
| {% endif %} |
|
|
| # |
| # TCP Syslog Server: |
| # provides TCP syslog reception and GSS-API (if compiled to support it) |
| {%- if config.listentcp|default(false) %} |
| $ModLoad imtcp.so |
| $InputTCPServerRun {{ config.listentcpprt|default('514') }} |
| {%- else %} |
| #$ModLoad imtcp.so |
| # |
| # |
| #$InputTCPServerRun <port> |
| {% endif %} |
| # UDP Syslog Server: |
| {%- if config.listenudp|default(false) %} |
| $ModLoad imudp.so |
| $UDPServerRun 514 |
| {%- else %} |
| #$ModLoad imudp.so |
| # |
| # |
| #$UDPServerRun 514 |
| {% endif %} |
|
|
| # |
| # -- TLS Syslog Server: |
| # |
| #$DefaultNetstreamDriver gtls |
| # |
| # |
| #$DefaultNetstreamDriverCAFile /etc/rsyslog.d/ca.pem |
| #$DefaultNetstreamDriverCertFile /etc/rsyslog.d/server_cert.pem |
| #$DefaultNetstreamDriverKeyFile /etc/rsyslog.d/server_key.pem |
| # |
| #$ModLoad imtcp |
| # |
| #$InputTCPServerStreamDriverMode 1 |
| #$InputTCPServerStreamDriverAuthMode anon |
| #$InputTCPServerRun 10514 |
| # |
| # -- TLS Syslog Client: |
| # |
| #$DefaultNetstreamDriverCAFile /etc/rsyslog.d/ca.pem |
| # |
| # |
| #$DefaultNetstreamDriver gtls |
| #$ActionSendStreamDriverMode 1 |
| #$ActionSendStreamDriverAuthMode anon |
| #*.* @@(o)server.example.net:10514 |
| |