Skip to content

Commit

Permalink
fix: Remove name="basics_imuxsock" parameter from imuxsock type input
Browse files Browse the repository at this point in the history
- Input of type imuxsock does not support the "name" parameter.
  When name is provided, rsyslog ouputs this error:
  parameter 'name' not known -- typo in config file?
- Indend if expressions for style
- Do not append input_template.j2 when use_imuxsock

See RHEL-35561
  • Loading branch information
spetrosi committed May 7, 2024
1 parent 0df557e commit 0b023eb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions roles/rsyslog/templates/input_basics.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@ module(load="imklog" permitnonkernelfacility="on")
{% if __rsyslog_input.use_imuxsock | d(false) | bool %}
module(load="imuxsock" # provides support for local system logging (e.g. via logger command)
SysSock.RateLimit.Interval="{{ __rsyslog_input.ratelimit_interval | d(0) }}"
{% if __rsyslog_input.ratelimit_interval | d(0) > 0 %}
{% if __rsyslog_input.ratelimit_interval | d(0) > 0 %}
SysSock.RateLimit.Burst="{{ __rsyslog_input.ratelimit_burst | d(200) }}"
{% endif %}
{% endif %}
SysSock.Use="on") # Turn on message reception via local log socket.
input(name="basics_imuxsock" type="imuxsock" socket="/dev/log")
input(type="imuxsock" socket="/dev/log")
{% else %}
module(load="imuxsock" # provides support for local system logging (e.g. via logger command)
SysSock.Use="off") # Turn off message reception via local log socket.
module(load="imjournal"
StateFile="{{ __rsyslog_work_dir }}/imjournal.state"
RateLimit.Interval="{{ __rsyslog_input.ratelimit_interval | d(600) }}"
{% if __rsyslog_input.ratelimit_interval | d(0) > 0 %}
{% if __rsyslog_input.ratelimit_interval | d(0) > 0 %}
RateLimit.Burst="{{ __rsyslog_input.ratelimit_burst | d(20000) }}"
{% endif %}
{% endif %}
PersistStateInterval="{{ __rsyslog_input.journal_persist_state_interval | d(10) }}")
{% endif %}
{% if not __rsyslog_input.use_imuxsock | d(false) | bool %}
{{ lookup('template', 'input_template.j2') }}
{% endif %}

0 comments on commit 0b023eb

Please sign in to comment.