rsyslog
: Set up Rsyslog 8rsyslog::server
: Sets up the RSyslog server
rsyslog::config
rsyslog::config::logrotate
: Default log rotation for RSyslogrsyslog::install
: Installs the packages necessary for use of RSyslogrsyslog::server::firewall
: Sets up the firewall rules for RSyslog with management bysimp/iptables
rsyslog::server::selinux
: Sets up SELinux for RSyslogrsyslog::server::tcpwrappers
: Sets up TCPWrappers for RSyslog both plain TCP and TCP over TLS as necessaryrsyslog::service
: Manage the RSyslog service
rsyslog::rule
: Adds a rulersyslog::rule::console
: Add a rule for writing logs to the consolersyslog::rule::data_source
: Add a rule for collecting logs from files on the systemrsyslog::rule::drop
: Add a rule to drop contentrsyslog::rule::local
: Add a rule targeting writing local system logsrsyslog::rule::other
: Adds an arbitrary rulersyslog::rule::remote
: Adds a rule to send messages to one or more remote systemrsyslog::template::list
: Add a template list to the rsyslog configuration filersyslog::template::plugin
: Add template plugins to the rsyslog configuration file.rsyslog::template::string
: Add template strings to the rsyslog configurationrsyslog::template::subtree
: Add template subtrees to the rsyslog configuration
Rsyslog::Boolean
: Representation of boolean values that are translated to 'on' and 'off' in Rsyslog configurationRsyslog::Options
: Hash of options to be used for Rsyslog global, legacy global or module configurationRsyslog::QueueType
: Rsyslog Queue Types
The configuration is particularly slanted toward the issues present in the versions of rsyslog included with Enterprise Linux systems. It should still work on other systems but they may have different/other bugs that have not been addressed.
See rsyslog::config
for additional, detailed configuration.
rsyslog::rules:
'some_path/99_collect_kernel_errors.conf':
content: "if prifilt('kern.err') then /var/log/kernel_errors.log"
'some_path/98_discard_info.conf':
content: "if prifilt('*.info') then stop"
The following parameters are available in the rsyslog
class:
service_name
package_name
tls_package_name
trusted_nets
enable_tls_logging
log_servers
failover_log_servers
queue_spool_directory
rule_dir
tcp_server
tcp_listen_port
tls_tcp_server
tls_tcp_listen_port
udp_server
udp_listen_address
udp_listen_port
read_journald
logrotate
pki
app_pki_external_source
app_pki_dir
rules
Data type: String
The name of the Rsyslog service; typically rsyslog
Default value: 'rsyslog'
Data type: String
The name of the Rsyslog package to install; typically rsyslog
Default value: 'rsyslog'
Data type: String
The name of the Rsyslog package to install TLS utilities; typically rsyslog-gnutls
Default value: "${package_name}-gnutls"
Data type: Simplib::Netlist
A list of subnets (in CIDR notation) permitted access
- This will be used in conjunction with
simp\iptables
(if enabled) to allow connections from within the given subnets.
Default value: simplib::lookup('simp_options::trusted_nets', {'default_value' => ['127.0.0.1/32'] })
Data type: Boolean
Enable the TLS libraries where applicable
- If enabled, clients will encrypt all log data being sent to the given log
servers. Also, all log servers specified to use TLS (see
rsyslog::server::tls_tcp_server
) will load theimtcp
module and configure it for TLS.
Default value: false
Data type: Simplib::Netlist
A list of primary Rsyslog servers
- All nodes in this list will get a copy of all logs if remote logging is enabled.
Default value: simplib::lookup('simp_options::syslog::log_servers', { 'default_value' => [] })
Data type: Simplib::Netlist
A list of the failover Rsyslog servers
- This order-dependent list will serve as all of the possible failover
log servers for clients to send to if the servers in
log_servers
are unavailable.
Default value: simplib::lookup('simp_options::syslog::failover_log_servers', { 'default_value' => [] })
Data type: Stdlib::Absolutepath
The path to the directory where Rsyslog should store disk message queues
Default value: '/var/spool/rsyslog'
Data type: Stdlib::Absolutepath
The path at which all managed rules will begin
Default value: '/etc/rsyslog.simp.d'
Data type: Boolean
Make this host listen for TCP
connections
- Ideally, all connections would be
TLS
enabled via$tls_tcp_server
instead. - Only enable this if necessary.
Default value: false
Data type: Simplib::Port
The port upon which to listen for regular TCP
connections
Default value: 514
Data type: Boolean
Make this host listen for TLS
enabled TCP
connections
Default value: false
Data type: Simplib::Port
The port upon which to listen for TLS
enabled TCP
connections
Default value: 6514
Data type: Boolean
Make this host listen for UDP
connections
- This really should not be enabled unless you have devices that cannot
speak
TLS
Default value: false
Data type: String
The address upon which to listen for UDP
connections
- The default of
127.0.0.1
is set primariliy for supporting Java applications that cannot work with a modern method of logging.
Default value: '127.0.0.1'
Data type: Simplib::Port
The port upon which to listen for UDP
connections
Default value: 514
Data type: Boolean
Enable the processing of journald
messages natively in Rsyslog
Default value: true
Data type: Boolean
Ensure that logrotate
is enabled on this system
- You will need to configure specific logrotate settings via the
logrotate
module.
Default value: simplib::lookup('simp_options::logrotate', {'default_value' => false})
Data type: Variant[Boolean,Enum['simp']]
- If 'simp', include SIMP's pki module and use pki::copy to manage application certs in /etc/pki/simp_apps/rsyslog/x509
- If true, do not include SIMP's pki module, but still use pki::copy to manage certs in /etc/pki/simp_apps/rsyslog/x509
- If false, do not include SIMP's pki module and do not use pki::copy
to manage certs. You will need to appropriately assign a subset of:
- app_pki_dir
- app_pki_key
- app_pki_cert
- app_pki_ca
- app_pki_ca_dir
Default value: simplib::lookup('simp_options::pki', {'default_value' => false})
Data type: String
-
If pki = 'simp' or true, this is the directory from which certs will be copied, via pki::copy. Defaults to /etc/pki/simp/x509.
-
If pki = false, this variable has no effect.
Default value: simplib::lookup('simp_options::pki::source', {'default_value' => '/etc/pki/simp/x509'})
Data type: Stdlib::Absolutepath
Basepath of $default_net_stream_driver_ca_file, default_net_stream_driver_cert_file, and $default_net_stream_driver_key_file
Default value: '/etc/pki/simp_apps/rsyslog/x509'
Data type: Hash
A hash of rsyslog rules, this parameter will enable you to create rules via hieradata
Default value: {}
This class is designed to configure the externally facing interfaces for a
RSyslog system. If you do not need external connectivity, you should just use
the stock rsyslog
Class.
The following parameters are available in the rsyslog::server
class:
Data type: Boolean
Enable the SIMP firewall rules for RSyslog
Default value: simplib::lookup('simp_options::firewall', { 'default_value' => false })
Data type: Optional[Boolean]
Enable the SIMP SELinux rules for RSyslog
Default value: $facts['os']['selinux']['enforced']
Data type: Boolean
Enable the SIMP TCPWrapper rules for RSyslog
Default value: simplib::lookup('simp_options::tcpwrappers', { 'default_value' => false })
This is used by the various rsyslog::rule::*
Defined Types to apply rules
to the system.
The naming convention for the rule must be some_directory/rule_name.conf
Feel free to use this Defined Type to add your own rules but remember that order matters!
In general, the order will be:
-
05 - Data Source Rules
-
06 - Console Rules
-
07 - Drop Rules
-
10 - Remote Rules
-
20 - Other/Miscellaneous Rules
-
99 - Local Rules
-
See also
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-viewing_and_managing_log_files#s1-basic_configuration_of_rsyslog.html
- Red Hat Basic Rsyslog Configuration
- https://www.rsyslog.com/doc/v8-stable/rainerscript/expressions.html
- Expressions in Rsyslog
- https://www.rsyslog.com/doc/v8-stable/rainerscript/index.html
- RainerScript Documentation
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-viewing_and_managing_log_files#s1-basic_configuration_of_rsyslog.html
rsyslog::rule { '99_simp_local/99_collect_kernel_errors.conf':
content => "if prifilt('kern.err') then /var/log/kernel_errors.log"
}
rsyslog::rule::other { '98_discard_info.conf':
rule => "if prifilt('*.info') then stop"
}
The following parameters are available in the rsyslog::rule
defined type:
Data type: Pattern['^[^/]\S+/\S+\.conf$']
The filename that you will be dropping into place
- WARNING: This must NOT be an absolute path!
Data type: String
The exact content of the rule to place in the target file
These rules first in priority. In general, the order will be:
-
Data Source Rules
-
Console Rules
-
Drop Rules
-
Remote Rules
-
Other/Miscellaneous Rules
-
Local Rules
-
See also
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-viewing_and_managing_log_files#s1-basic_configuration_of_rsyslog.html
- Red Hat Basic Rsyslog Configuration
- https://www.rsyslog.com/doc/v8-stable/rainerscript/expressions.html
- Expressions in Rsyslog
- https://www.rsyslog.com/doc/v8-stable/rainerscript/index.html
- RainerScript Documentation
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-viewing_and_managing_log_files#s1-basic_configuration_of_rsyslog.html
rsyslog::rule::console { 'emergency_rule':
rule => 'prifilt(\'*.emerg\'),
users => ['*']
}
The following parameters are available in the rsyslog::rule::console
defined type:
Data type: String
The filename that you will be dropping into place
Data type: String
The Rsyslog EXPRESSION
to filter on
Data type: Array[String]
Users to which to send the console messages
In general, the order will be:
-
Data Source Rules
-
Console Rules
-
Drop Rules
-
Remote Rules
-
Other/Miscellaneous Rules
-
Local Rules
-
See also
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-viewing_and_managing_log_files#s1-basic_configuration_of_rsyslog.html
- Red Hat Basic Rsyslog Configuration
- https://www.rsyslog.com/doc/v8-stable/rainerscript/expressions.html
- Expressions in Rsyslog
- https://www.rsyslog.com/doc/v8-stable/rainerscript/index.html
- RainerScript Documentation
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-viewing_and_managing_log_files#s1-basic_configuration_of_rsyslog.html
The filename that you will be dropping into place.
rsyslog::rule::data_source { 'new_input':
rule => @(EOM)
input(type="imfile"
File="/opt/log/my_app"
StateFile="my_app"
Tag="my_app"
Facility="local6"
Severity="notice"
)
|EOM
}
The following parameters are available in the rsyslog::rule::data_source
defined type:
Data type: String
The filename that you will be dropping into place
Data type: String
The Rsyslog EXPRESSION
to filter on
In general, the order will be:
-
Data Source Rules
-
Console Rules
-
Drop Rules
-
Remote Rules
-
Other/Miscellanious Rules
-
Local Rules
-
See also
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-viewing_and_managing_log_files#s1-basic_configuration_of_rsyslog.html
- Red Hat Basic Rsyslog Configuration
- https://www.rsyslog.com/doc/v8-stable/rainerscript/expressions.html
- Expressions in Rsyslog
- https://www.rsyslog.com/doc/v8-stable/rainerscript/index.html
- RainerScript Documentation
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-viewing_and_managing_log_files#s1-basic_configuration_of_rsyslog.html
The filename that you will be dropping into place.
rsyslog::rule::drop { 'drop_bad_stuff':
rule => 're_match($msg, '^.*bad_stuff.*$')'
}
The following parameters are available in the rsyslog::rule::drop
defined type:
Data type: String
The filename that you will be dropping into place
Data type: String
The Rsyslog EXPRESSION
to filter on
NOTE: Any option that is not explicitly documented here matches the
ruleset
options in the Rsyslog documentation.
In general, the order will be:
- Data Source Rules
- Console Rules
- Drop Rules
- Remote Rules
- Other/Miscellaneous Rules
- Local Rules
NOTE: Since many of the parameters here may need to be modified on a
case-by-base basis, this defined type uses capabilities presented by the
simplib::dlookup
function to allow for either global overrides or
instance-specific overrides.
Global overrides work the same way as classes
(rsyslog::rule::local::file_create_mode: '0644'
) but will affect all
instances of the defined type that are not specifically overridden as shown
below.
Instance specific overrides preclude the need for a resource collector in
that you can place the follwing in Hiera to affect a single instance named
my_rule
: Rsyslog::Rule::Local[my_rule]::file_create_mode: '0600'
- See also
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-viewing_and_managing_log_files#s1-basic_configuration_of_rsyslog.html
- Red Hat Basic Rsyslog Configuration
- https://www.rsyslog.com/doc/v8-stable/rainerscript/expressions.html
- Expressions in Rsyslog
- https://www.rsyslog.com/doc/v8-stable/rainerscript/index.html
- RainerScript Documentation
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-viewing_and_managing_log_files#s1-basic_configuration_of_rsyslog.html
rsyslog::rule::local { 'collect_openldap':
rule => "prifilt('local4.*')",
target_log_file => '/var/log/slapd.log',
stop_processing => true
}
The following parameters are available in the rsyslog::rule::local
defined type:
name
rule
target_log_file
stop_processing
dyna_file
template
dyna_file_cache_size
zip_level
very_robust_zip
flush_interval
async_writing
flush_on_tx_end
io_buffer_size
dir_owner
dir_owner_num
dir_group
dir_group_num
file_owner
file_owner_num
file_group
file_group_num
file_create_mode
dir_create_mode
fail_on_chown_failure
create_dirs
sync
sig_provider
cry_provider
queue_validation_log_level
queue_filename
queue_spool_directory
queue_size
queue_dequeue_batch_size
queue_max_disk_space
queue_high_watermark
queue_low_watermark
queue_full_delay_mark
queue_light_delay_mark
queue_discard_mark
queue_discard_severity
queue_checkpoint_interval
queue_sync_queue_files
queue_type
queue_worker_threads
queue_timeout_shutdown
queue_timeout_action_completion
queue_timeout_enqueue
queue_timeout_worker_thread_shutdown
queue_worker_thread_minimum_messages
queue_max_file_size
queue_save_on_shutdown
queue_dequeue_slowdown
queue_dequeue_time_begin
queue_dequeue_time_end
content
Data type: String
The filename that you will be dropping into place
Data type: Optional[String[1]]
The Rsyslog EXPRESSION
to filter on
-
NOTE: Do NOT include the leading
if/then
- Correct: ``rule => "prifilt('.')"
- Incorrect:
rule => "if prifilt('*.*') then"
-
This must be set if
$content
is undefined
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
The target log file that omfile will be writing to
- This must be set if
$dyna_file
is undefined
Default value: undef
Data type: Boolean
Do not forward logs to any further ruleset
s after processing this ruleset
Default value: false
Data type: Optional[String[1]]
Set a dynamic
filename using the property replacer rules
-
NOTE: If you make this the filename path itself, a template will automatically be created for you. Otherwise, you must make sure to have a rsyslog template in place and pass the name of the template to this option
-
Rsyslog templates can be created using the
rsyslog::template::*
defined types
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Data type: Integer[0]
Default value: 10
Data type: Integer[0,9]
Default value: 0
Data type: Boolean
Default value: true
Data type: Integer[0]
Default value: 0
Data type: Boolean
Default value: false
Data type: Boolean
Default value: true
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Stdlib::Filemode
Default value: simplib::dlookup('rsyslog::rule::local', 'file_create_mode', $name, { 'default_value' => '0640' })
Data type: Stdlib::Filemode
Default value: simplib::dlookup('rsyslog::rule::local', 'dir_create_mode', $name, { 'default_value' => '0750' })
Data type: Boolean
Default value: true
Data type: Boolean
Default value: true
Data type: Boolean
Default value: false
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Data type: Simplib::PuppetLogLevel
Default value: simplib::dlookup('rsyslog::rule::local', 'queue_validation_log_level', $name, { 'default_value' => 'warning' })
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Boolean
Default value: false
Data type: Rsyslog::QueueType
Default value: 'Direct'
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[String[1]]
Default value: simplib::dlookup('rsyslog::rule::local', 'queue_max_file_size', $name, { 'default_value' => undef })
Data type: Boolean
Default value: false
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[String[1]]
the *entire content of the rsyslog::rule
-
If you do not specify this,
$rule
is a required variable -
If you do specify this,
$rule
will be ignored
Default value: undef
The main reason to use this is to ensure proper ordering in the stack. If you
want to insert a rule anywhere, use the $rsyslog::rule
Defined Type
In general, the order will be:
- Data Source Rules
- Console Rules
- Drop Rules
- Remote Rules
- Other/Miscellaneous Rules
- Local Rules
fine: rsyslog::rule::other
- See also
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-viewing_and_managing_log_files#s1-basic_configuration_of_rsyslog.html
- Red Hat Basic Rsyslog Configuration
- https://www.rsyslog.com/doc/v8-stable/rainerscript/expressions.html
- Expressions in Rsyslog
- https://www.rsyslog.com/doc/v8-stable/rainerscript/index.html
- RainerScript Documentation
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-viewing_and_managing_log_files#s1-basic_configuration_of_rsyslog.html
The filename that you will be dropping into place.
rsyslog::rule::other { 'send_local0_away':
rule => "if prifilt('local0.*') then @@1.2.3.4"
}
The following parameters are available in the rsyslog::rule::other
defined type:
Data type: String
The filename that you will be dropping into place
Data type: String
The Rsyslog EXPRESSION
to filter on
The rule will include a forwarding ('omfwd') action for each
primary and failover syslog server specified via $dest
and
$failover_log_servers
, respectively.
In general, the order will be:
- Data Source Rules
- Console Rules
- Drop Rules
- Remote Rules
- Other/Miscellaneous Rules
- Local Rules
In general, individual send stream driver settings are properly supported with the Rsyslog 8 EL versions available for CentOS 7 and the Rsyslog 7 EL versions available for CentOS 6. However, for TLS support, you must also configure global Rsyslog parameters as follows:
-
TLS sending and/or receiving requires the global DefaultNetStreamDriver, DefaultNetStreamDriverCAFile, DefaultNetStreamDriverCertFile, and DefaultNetStreamDriverKeyFile parameters to be configure via
rsyslog::config
. -
TLS sending for Rsyslog 7 EL versions requires the global ActionSendStreamDriverMode configuration parameter to be configured via
rsyslog::config
IN ADDITION TO the$stream_driver_mode
.
WARNING
If possible, this module will take pains to prevent adding a target that is equivalent to the current system to prevent syslog loops.
Unfortunately, there is no foolproof method for getting this correct 100% of the time so please take care when setting your destination targets.
WARNING
-
This must be set if
$content
is left empty -
See also
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-viewing_and_managing_log_files#s1-basic_configuration_of_rsyslog.html
- Red Hat Basic Rsyslog Configuration
- https://www.rsyslog.com/doc/v8-stable/rainerscript/expressions.html
- Expressions in Rsyslog
- https://www.rsyslog.com/doc/v8-stable/rainerscript/index.html
- RainerScript Documentation
- https://simp.readthedocs.io/en/stable/user_guide/HOWTO/Central_Log_Collection.html
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-viewing_and_managing_log_files#s1-basic_configuration_of_rsyslog.html
rsyslog::rule::remote { 'send_local0_away':
rule => "prifilt('local0.*')",
dest => ['1.2.3.4']
}
The following parameters are available in the rsyslog::rule::remote
defined type:
name
rule
stop_processing
template
dest
dest_type
failover_log_servers
tcp_framing
zip_level
max_error_messages
compression_mode
compression_stream_flush_on_tx_end
rebind_interval
keep_alive
keep_alive_probes
keep_alive_interval
keep_alive_time
action_resume_interval
action_resume_retry_count
stream_driver
stream_driver_mode
stream_driver_auth_mode
stream_driver_permitted_peers
resend_last_msg_on_reconnect
udp_send_to_all
queue_validation_log_level
queue_filename
queue_spool_directory
queue_size
queue_dequeue_batch_size
queue_max_disk_space
queue_high_watermark
queue_low_watermark
queue_full_delay_mark
queue_light_delay_mark
queue_discard_mark
queue_discard_severity
queue_checkpoint_interval
queue_sync_queue_files
queue_type
queue_worker_threads
queue_timeout_shutdown
queue_timeout_action_completion
queue_timeout_enqueue
queue_timeout_worker_thread_shutdown
queue_worker_thread_minimum_messages
queue_max_file_size
queue_save_on_shutdown
queue_dequeue_slowdown
queue_dequeue_time_begin
queue_dequeue_time_end
content
Data type: String
The filename that you will be dropping into place
Data type: Optional[String[1]]
The Rsyslog EXPRESSION
to filter on
-
This should only be the matching part of the expression, the remaining parameters take care of ensuring that the material is properly routed.
-
NOTE: Do NOT include the leading
if/then
- Correct: ``rule => "prifilt('.')"
- Incorrect:
rule => "if prifilt('*.*') then"
Default value: undef
Data type: Boolean
Do not forward logs to any further ruleset
s after processing this ruleset
Default value: false
Data type: Optional[String[1]]
The template that should be used to format the content
Default value: undef
Data type: Simplib::Netlist
If filled, logs matching $rule
will be sent to all hosts in this Array.
- WARNING: If using this, do NOT add a destination to your
rule
Default value: []
Data type: Enum['tcp','udp','relp']
The destination type for all entries in $dest
- At this time, if you wish to have different types per destination, you
will need to either create a
rsyslog::rule::remote
for each destnation or craft your own ruleset and leave$dest
empty.
Default value: 'tcp'
Data type: Simplib::Netlist
The listed systems will be used as failover servers for all logs matching
this rule
- Uses
$dest_type
above
Default value: []
Data type: Enum['traditional','octet-counted']
Default value: 'traditional'
Data type: Integer[0,9]
Default value: 0
Data type: Integer[0]
Default value: 5
Data type: Enum['none','single','stream:always']
Default value: 'none'
Data type: Boolean
Default value: true
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Boolean]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Integer[0]
Default value: 30
Data type: Integer[-1]
Default value: -1
Data type: Optional[String[1]]
-
This is only used to set the StreamDriver directive in the forwarding actions for remote servers if TLS is enabled and
$dest_type
is not UDP. -
Overridden by 'DefaultNetstreamDriver' global stream configuration specified by
rsyslog::config::default_net_stream_driver
.
Default value: undef
Data type: Integer[0]
- This is only used to set the StreamDriverMode directive in the
forwarding actions for remote servers if TLS is enabled and
$dest_type
is not UDP.
Default value: 1
Data type: String
This is only used to set the StreamDriverAuthMode directive in the
forwarding actions for remote servers if TLS is enabled and
$dest_type
is not UDP.
Default value: 'x509/name'
Data type: Optional[String[1]]
-
This is only used to set the StreamDriverPermittedPeers directive in the forwarding actions for remote servers if TLS is enabled and
$dest_type
is not UDP. -
If this is set, the value will be used for all forwarding actions for the remote servers in
$dest
and$failover_log_servers
. -
If this is undefined,
-
If ALL of the remote servers in
$dest
and$failover_log_servers
are specified as a hostname variants, the StreamDriverPermittedPeers directive for the forwarding action for each server will be set to that server's hostname. -
If ANY and of the remote servers in
$dest
and$failover_log_servers
is specified as an IP address variant, the StreamDriverPermittedPeers directive for the forwarding action for each server will be set to the domain of the Puppet client. This behavior provides backward compatibility with earlier versions of this module.
-
-
rsyslog expects StreamDriverPermittedPeers to be a comma-separated list of fingerprints (SHA1) and/or names of remote peers, which it will use to match against the certificate presented from the remote server.
Default value: undef
Data type: Boolean
Default value: true
Data type: Boolean
Default value: false
Data type: Simplib::PuppetLogLevel
Default value: simplib::dlookup('rsyslog::rule::remote', 'queue_validation_log_level', $name, { 'default_value' => 'warning' })
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Boolean
Default value: false
Data type: Rsyslog::QueueType
Default value: 'LinkedList'
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Data type: Boolean
Default value: true
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[Integer[0]]
Default value: undef
Data type: Optional[String[1]]
the *entire content of the rsyslog::rule
-
If you do not specify this,
$rule
is a required variable -
If you do specify this,
$rule
will be ignored
Default value: undef
RSyslog list templates can contain properties and constants. In order to capture this functionality, we have opted for making a hash of these. The Hash will be ordered as given to the content variable.
$content_hash = {
'constant' => 'values="Syslog MSG is: \'"',
'property' => 'name="msg"'
}
rsyslog::template::list { 'example_list':
$content => $content_hash
}
### Produces:
template(name="example_list" type="list") {
constant(value="Syslog MSG is: '")
property(name="msg")
}
The following parameters are available in the rsyslog::template::list
defined type:
Data type: String
The literal name (not path) of the file
that will be written
Data type: Hash[String,String,1]
The rsyslog list content that you wish to add to the system, as a Hash
NOTE: Plugins are as-is. This means that you will only supply the plugin name and assume that the plugin has already been loaded by RSyslog.
rsyslog::template::string { 'example_plugin':
$plugin => 'my_plugin'
}
### Produces:
template(name="example_plugin" type="plugin" plugin="my_plugin")
The following parameters are available in the rsyslog::template::plugin
defined type:
Data type: String
The literal name of the file
(not the full path) that will be used
Data type: String
The rsyslog plugin content that you wish to add to the system
- This is provided, without formatting, directly into the target file
You'll need to write the entire template line due to the complexity of the rsyslog configuration parameters.
Leading spaces will be removed.
rsyslog::template::string { 'example':
$content => '/var/log/hosts/%HOSTNAME%/example.log'
}
### Produces:
template(name="example" type="string" string="/var/log/hosts/%HOSTNAME%/example.log")
The following parameters are available in the rsyslog::template::string
defined type:
Data type: String
The literal name of the file
(not file path) that will be used
Data type: String
The rsyslog template string that you wish to add to the system
- This is fed, without formatting, directly into the target file
You'll need to write the entire subtree line due to the complexity of the rsyslog configuration parameters.
rsyslog::template::subtree { 'example_subtree':
$variables => ['$!usr!tp12!msg = $msg;', '$!usr!tp12!dataflow = field($msg, 58, 2);'],
$subtree => '$!usr!tp12'
}
### Produces:
set $!usr!tp12!msg = $msg;
set $!usr!tp12!dataflow = field($msg, 58, 2);
template(name="example" type="subtree" subtree="$!usr!tp12")
The following parameters are available in the rsyslog::template::subtree
defined type:
Data type: String
The literal name of the file
(not a path) that will be used
Data type: String
The rsyslog subtree content that you wish to add to the system
- This is fed, without formatting, directly into the subtree parameter
Data type: Array[String]
Variables to be set prior to the template being created
Default value: []
Representation of boolean values that are translated to 'on' and 'off' in Rsyslog configuration
Alias of Variant[Enum['on','off'], Boolean]
Hash of options to be used for Rsyslog global, legacy global or module configuration
Alias of Hash[String, Variant[Numeric,String]]
Rsyslog Queue Types
Alias of Enum['FixedArray', 'LinkedList', 'Direct', 'Disk']