Default variable details
debops.rsyslog default variables have more extensive configuration
than simple strings or lists, here you can find documentation and examples for
are lists used to define forwarding rules for rsyslog. Because the
daemon configuration is ordered, the forward statements should be set in
a specific place in the configuration. You can of course define your own
forwarding rules instead of using these specific variables, if you wish.
You can check the rsyslog remote forward documentation to see
how to forward logs to other hosts. Each configuration entry should be
specified in a separate YAML list element. The entries can be simple FQDN
hostnames which will be configured to use TCP connections over TLS and port
6514; alternatively you can define more detailed configuration using
What type of logs to forward to another server, by default
*.*(all facilities, all priorities).
The FQDN of the syslog server where logs will be forwarded.
The port to which
rsyslogwill connect, by default
The protocol which should be used for connections, by default
Number of times
rsyslogshould try to reconnect to the syslog server when connection is lost, by default
The type of the internal queue to use for this server, by default
The size of the message queue, by default
The NetStream driver used by the
imtcpmodule, defaults to the value of
The NetStream driver mode, defaults to the value of
The NetStream driver authentication mode, defaults to the value of
rsyslog__*_configuration variables define the contents of the
/etc/rsyslog.conf configuration file. This is the main
rsyslog configuration, additional config snippets can be found in
/etc/rsyslog.d/ directory, which can be managed using the
Enable kernel log input module in rsyslog service:
- name: 'module_imklog'
The variables are lists of YAML dictionaries with specific parameters:
Required. An identification of the configuration entry, not used otherwise. Multiple configuration entries with the same
nameparameter are merged together; this can be used to modify already defined entries.
Optional. If not defined or
present, a given configuration entry will be present in the generated config file. If
absent, the entry will not be included in the configuration file. If
comment, the entry will be present, but commented out. If
ignore, a given configuration entry will not be evaluated during role execution.
Optional. String or a YAML text block with additional comments about a given configuration entry, included in the generated file.
Optional. Specify the configuration section in which a given entry should be included. The sections are defined using the rsyslog__configuration_sections variables; the default sections available are:
unknown. If the section is not defined, the entry will be added to the
rsyslog__*_configuration_sections variables define what sections are
present in the
/etc/rsyslog.conf configuration file. Sections will be
included in the file in the order they appear in the configuration variables.
Define a section with a custom title:
- name: 'custom_section'
title: 'Example configuration'
Each configuration entry is a YAML dictionary with specific parameters:
Required. The name of the section, used in the
sectionparameter of the
/etc/rsyslog.confconfiguration. Multiple entries with the same
nameparameter are merged together.
Optional. This parameter can be used to override the section name which is used in the generated configuration file.
Optional. If not specified or
present, a given section will be included in the generated configuration file. If
absent, the section will not be included in the file. If
ignore, a given configuration entry will not be evaluated during role execution. If
hidden, the section's title comment will be hidden in the generated configuration file.
Optional. A positive or negative number which can be used to affect the order of sections in the generated configuration file. Positive numbers add more "weight" to the section making it appear "lower" in the file; negative numbers subtract the "weight" and therefore move the section upper in the file.
rsyslog__*_rules variables define the configuration stored in the
/etc/rsyslog.d/ directory. Configuration files in the directory can be
named with different "extensions", each one imported at different point in the
/etc/rsyslog.conf configuration file. The supported extensions are:
rsyslog__default_rules variable for example configurations.
Each configuration file is described using YAML dictionaries with specific parameters:
Required. Name of the configuration file in the
/etc/rsyslog.d/directory. Multiple configuration entries with the same
nameparameter will be merged together.
Optional, boolean. If specified and
True, the debops.rsyslog role will use the dpkg-divert command to move specified originaL configuration file out of the way before generating the configuration from a template. This parameter can be used to modify the
rsyslogdconfiguration provided by the system packages.
Optional. If the
divertparameter is enabled, using this parameter you can specify the filename to divert the file to. The diversion will be confined to
/etc/rsyslog.d/directory. This can be used to change the order of the packaged configuration files if needed.
Optional. A comment added at the beginning of the file.
A string or YAML text block with the rsyslog.conf(5) configuration, included in the generated config files as-is.
absent. If undefined or
presenta given configuration file present, if
absent, given configuration file will be removed. If
ignore, a given configuration entry will not be evaluated during execution. This parameter can be used to conditionally enable or disable parts of the configuration.
Optional. This is a list of YAML dictionaries with configuration definition which should be included in the given file. If the
rawparameter is present on the file level, the
optionslist is ignored.
Each configuration entry in the
optionslist needs to be defined as a YAML dictionary with parameters:
Required. An identifier for a particular section of the configuration file, not used otherwise. The options with the same
nameparameter from different configuration file entries are merged together.
Optional. A comment added at the beginning of a given section.
A string or YAML text block with the rsyslog.conf(5) configuration, included in the generated config file section as-is.
absent. If undefined or
presenta given configuration file or configuration section will be present, if
absent, given configuration file or section will be removed. This parameter can be used to conditionally enable or disable parts of the configuration.