321a32ee15
This commit adds the rsyslog_server role which will provide a system which all logs will be agregeated. This change is part 2 of 3 to update all of the logging bits within the stack such that they're made more generic and community consumable. Roles added: * rsyslog_server Plays added: * rsyslog-install.yml Plays modified: * setup-infrastructure.yml DocImpact Implements: blueprint rsyslog-update Change-Id: I7627e362a7ee3b560dc02a1beda2034998216451
62 lines
1.3 KiB
Django/Jinja
62 lines
1.3 KiB
Django/Jinja
# {{ ansible_managed }}
|
|
|
|
#################
|
|
#### MODULES ####
|
|
#################
|
|
$ModLoad imuxsock # provides support for local system logging
|
|
$ModLoad imklog # provides kernel logging support
|
|
|
|
{% if rsyslog_server_udp_reception == true %}
|
|
# provides UDP syslog reception
|
|
$ModLoad imudp
|
|
$UDPServerRun {{ rsyslog_server_udp_port }}
|
|
{% endif %}
|
|
|
|
{% if rsyslog_server_tcp_reception == true %}
|
|
# provides TCP syslog reception
|
|
$ModLoad imtcp
|
|
$InputTCPServerRun {{ rsyslog_server_tcp_port }}
|
|
{% endif %}
|
|
|
|
# Enable non-kernel facility klog messages
|
|
$KLogPermitNonKernelFacility on
|
|
|
|
|
|
###########################
|
|
#### GLOBAL DIRECTIVES ####
|
|
###########################
|
|
#
|
|
# Use traditional timestamp format.
|
|
# To enable high precision timestamps, comment out the following line.
|
|
#
|
|
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
|
|
|
# Filter duplicated messages
|
|
$RepeatedMsgReduction on
|
|
|
|
#
|
|
# Set the default permissions for all log files.
|
|
#
|
|
$FileOwner syslog
|
|
$FileGroup adm
|
|
$FileCreateMode 0640
|
|
$DirCreateMode 0755
|
|
$Umask 0022
|
|
$PrivDropToUser syslog
|
|
$PrivDropToGroup syslog
|
|
|
|
#
|
|
# Where to place spool and state files
|
|
#
|
|
$WorkDirectory {{ rsyslog_server_spool_directory }}
|
|
|
|
#
|
|
# Include all config files in /etc/rsyslog.d/
|
|
#
|
|
$IncludeConfig /etc/rsyslog.d/*.conf
|
|
|
|
$template DDF, "{{ rsyslog_server_storage_directory }}/%hostname%/%programname%.log"
|
|
if \
|
|
$source != 'logsrv' \
|
|
then -?DDF
|