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

Allow overriding of the Include directive in the /etc/rsyslog.conf file to support older versions of rsyslogd. #251

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bschonec
Copy link
Contributor

@bschonec bschonec commented Dec 4, 2024

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: puppet-agent-7.33.0-1.el7.x86_64
  • Distribution: Red Hat Enterprise Linux Server release 7.9 (Maipo)
  • Module version: Commit 40440a8

What are you seeing

The module incorrectly assumes that the include() object is supported on rsyslog without first checking (or providing an override) for an appropriate version of rsyslog.

What behaviour did you expect instead

This module uses the new syntax of include() instead of the older $IncludeConfig. The include() syntax is supported only on rsyslog > 8.33.0.

Output log

syslogd[39175]: action 'include' treated as ':omusrmsg:include' - please use ':omusrmsg:include' syntax instead, 'include' will not be supported in the future [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2184 ]
syslogd[39175]: error during parsing file /etc/rsyslog.conf, on or before line 5: warnings occured in file '/etc/rsyslog.conf' around line 5 [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2207 ]
syslogd[39175]: error during parsing file /etc/rsyslog.conf, on or before line 5: invalid character '(' - is there an invalid escape sequence somewhere? [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2207 ]
syslogd[39175]: action 'file' treated as ':omusrmsg:file' - please use ':omusrmsg:file' syntax instead, 'file' will not be supported in the future [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2184 ]
syslogd[39175]: error during parsing file /etc/rsyslog.conf, on or before line 5: warnings occured in file '/etc/rsyslog.conf' around line 5 [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2207 ]
syslogd[39175]: error during parsing file /etc/rsyslog.conf, on or before line 5: invalid character '=' - is there an invalid escape sequence somewhere? [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2207 ]
syslogd[39175]: error during parsing file /etc/rsyslog.conf, on or before line 5: invalid character '"' - is there an invalid escape sequence somewhere? [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2207 ]
syslogd[39175]: invalid character in selector line - ';template' expected [v8.24.0-57.el7_9.3]
syslogd[39175]: error during parsing file /etc/rsyslog.conf, on or before line 5: errors occured in file '/etc/rsyslog.conf' around line 5 [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2207 ]

Any additional information you'd like to impart

The module should do one of the following:

  1. check for the version of rsyslog RPM that's currently installed
  2. provide a way to override the (current) default syntax of include().
  3. leverage hiera data to grab the major os version of the operating system and apply appropriate "include" directives.

The latest version of rsyslog available for RHEL7 is rsyslog-8.24.0-57.el7_9.3.x86_64.rpm.

@m8t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant