-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Module does not work on RHEL 7 #98
Comments
By default this module places all config in a file called This was done as this module is used across a variety of distros and use cases (including managing a config file mounted as a volume into an Rsyslog docker container). While making this an option was considered, it was passed on as it is purely a preference rather than providing any additional/better functionality. That said, you can manually override the rsyslog::client::global_config:
'WorkDirectory':
value: '/var/lib/rsyslog'
type: 'legacy'
target_file: '/etc/rsyslog.d/10_global.conf While we do support legacy Rsyslog config options, this module's primary target is the Rsyslog 7+ rainerscript style configuration. |
@linuxdan any updates on this issue? |
I have not had any spare brain cycles to investigate this. |
I will leave it open then |
@linuxdan Any updates? Are you still seeing this issue? |
Brand new CentOS 7 server, loaded with PuppetServer 6.3.0 and Puppet Agent 6.4.1 All I have in the common.yaml is classes:
Running puppet agent still wipes out the contents of /etc/rsyslog.d and /etc/rsyslog.conf and inserts nothing. There are no instructions about basic client setup, so IMHO, it is still busted. |
@linuxdan The docs need some updating to make this clear, but by default the module will manage and replace the defaults: https://github.com/voxpupuli/puppet-rsyslog/blob/master/data/common.yaml#L8-L9 As for client configuration, the documentation addresses most of the options for client configuration, but this is designed for Rsyslog >= 8.x and expects mostly rainerscript to be used. There is a large major release coming up, but as I'm largely the only person working on it, it is taking some time. |
@dhollinger Would you agree to add some typical default values to the module data? I'd be able to provide defaults for Redhat and Debian. This would ensure that the module would leave a system's log service in a working condition. |
I'd be up for defaults for OS-types, though it'd probably be best to keep it to the OS defaults and it'd have to be in the |
Hey, folks. I finally had time to revisit this. It works for me now mostly thanks to the So, here is the default
and
Here is the initial YAML file I worked out from looking at the example: ---
# Node: CentOS 7
classes:
- rsyslog::client
rsyslog::client::global_config:
WorkDirectory:
type: legacy
value: '/var/lib/rsyslog'
ActionFileDefaultTemplate:
type: legacy
value: "RSYSLOG_TraditionalFileFormat"
ActionQueueFileName:
type: legacy
value: 'fwdRule1'
ActionQueueMaxDiskSpace:
type: legacy
value: '1g'
ActionQueueSaveOnShutdown:
type: legacy
value: 'on'
ActionQueueType:
type: legacy
value: 'LinkedList'
ActionResumeRetryCount :
type: legacy
value: '-1'
rsyslog::client::modules:
imjournal:
config:
StateFile : 'imjournal.state'
imuxsock:
config:
'SysSock.Use' : 'on'
socket: '/run/systemd/journal/syslog'
rsyslog::client::legacy_config:
messages_rule:
key: "*.info;mail.none;authpriv.none;cron.none"
value: "/var/log/messages"
auth_priv_rule:
key: "auth,authpriv.*"
value: "/var/log/secure"
mail_rule:
key: "mail.*"
value: "-/var/log/mail.log"
cron_rule:
key: "cron.*"
value: "/var/log/cron"
emergency_rule:
key: "*.emerg"
value: ":omusrmsg:*"
news_rule:
key: "uucp,news.crit"
value: "/var/log/spooler"
boot_rule:
key: "local7.*"
value: "/var/log/boot.log"
remote_host_rule:
key: "*.*"
value: "@@remote-host:514"
# vim: ft=yaml:sts=2:sw=2:et And the resulting
I thought that looks great. ---
# Node: CentOS 7 Console Workstation/Server lb-gsf14-console-05.lab.nascom.nasa.gov
classes:
- rsyslog::client
rsyslog::client::global_config:
WorkDirectory:
priority: 12
type: legacy
value: '/var/lib/rsyslog'
ActionFileDefaultTemplate:
priority: 13
type: legacy
value: "RSYSLOG_TraditionalFileFormat"
ActionQueueFileName:
priority: 99
type: legacy
value: 'fwdRule1'
ActionQueueMaxDiskSpace:
priority: 99
type: legacy
value: '1g'
ActionQueueSaveOnShutdown:
priority: 99
type: legacy
value: 'on'
ActionQueueType:
priority: 99
type: legacy
value: 'LinkedList'
ActionResumeRetryCount :
priority: 99
type: legacy
value: '-1'
rsyslog::client::modules:
imjournal:
priority: 11
config:
StateFile : 'imjournal.state'
imuxsock:
priority: 10
config:
'SysSock.Use' : 'on'
socket: '/run/systemd/journal/syslog'
rsyslog::client::legacy_config:
messages_rule:
key: "*.info;mail.none;authpriv.none;cron.none"
value: "/var/log/messages"
auth_priv_rule:
key: "auth,authpriv.*"
value: "/var/log/secure"
mail_rule:
key: "mail.*"
value: "-/var/log/mail.log"
cron_rule:
key: "cron.*"
value: "/var/log/cron"
emergency_rule:
key: "*.emerg"
value: ":omusrmsg:*"
news_rule:
key: "uucp,news.crit"
value: "/var/log/spooler"
boot_rule:
key: "local7.*"
value: "/var/log/boot.log"
remote_host_rule:
priority: 99
key: "*.*"
value: "@@remote-host:514"
# vim: ft=yaml:sts=2:sw=2:et And got this
|
Module doesn't work RHEL8 either. It wipes out existing configuration without providing any sensible defaults, same as RHEL7. That's not a normal behavior for a puppet module |
@vchepkov I don't generally work within RHEl7 or RHEL8 anymore, so I'd love it if someone could contribute some default configurations for each OS. I'd do it, but I currently don't have time to spin up a container or VM of every OS and transcribe the defaults to the module. |
From what I can see from the code, module doesn't set any sensible defaults for any OS, unless I miss something. |
@vchepkov At the time of the writing of this module |
Correct, I was pointing out that lack of defaults in data/ is common for all OS, not just RHEL as this ticket reports |
Is there any progress for this topic ? Is there any interest from the maintainers to get working defaults ? |
The examples above worked for me - had to change |
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
dwhite2.sec.dte.cert.org.yaml.txt
What are you seeing
etc-rsyslog.conf.txt
and /etc/rsyslog.d/ is empty
What behaviour did you expect instead
Previous /etc/rsyslog.conf: (trimmed of comment lines)
etc-rsyslog.conf-orig.txt
Previous /etc/rsyslog.d/listen.conf:
etc-rsyslog.d-listen.conf-orig.txt
Output log
puppet-run-2018-09-07-09-48-15.txt
Use "less -r" to view without garbage
The text was updated successfully, but these errors were encountered: