Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for configuring modules in new format #11

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,30 @@ Rsyslog service with precise timestamps, severity, facility.
createmode: 0640
umask: 0022
stop_processing: true

RainerScript Support for module configuration
=============================================

In addition to support for the legacy format, `modules <http://www.rsyslog.com/doc/v8-stable/configuration/modules/index.html>`_ can be configured using the `RainerScript <http://www.rsyslog.com/doc/v8-stable/rainerscript/index.html>`_ format.

.. code-block:: yaml

rsyslog:
client:
enabled: true
rainerscript:
imjournal:
PersistStateInterval: 200
StateFile: /run/systemd/journal/rsyslog
IgnorePreviousMessages: on
output
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing :

file:
-/var/log/syslog:
filter: *.*;auth,authpriv.none
owner: syslog
group: adm
createmode: 0640
umask: 0022

Custom templates
================
Expand Down
12 changes: 12 additions & 0 deletions rsyslog/files/rsyslog.default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
{% for modname in global.modules -%}
$ModLoad {{ modname }}
{% endfor -%}

{%- if global.rainerscript is defined %}
{%- for module_name, config_opts in global.rainerscript.iteritems() %}

module(load"{{ module_name }}"
{%- for option, setting in config_opts.iteritems() %}
{{ option }}="{{ setting }}"
{%- endfor %}
)
{%- endfor %}
{%- endif %}

{% if global.preserve_fqdn == true -%}
$PreserveFQDN on
{% else -%}
Expand Down