-
Notifications
You must be signed in to change notification settings - Fork 25
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
Disable rsyslog duplication of systemd-journal #426
Disable rsyslog duplication of systemd-journal #426
Conversation
@bdunne Please review. |
Okay with the
And confirmed that after restarting rsyslog.service journal messages are no longer duplicated to |
Okay retested after adding the |
@@ -82,6 +82,13 @@ if systemctl is-active --quiet evm-failover-monitor; then | |||
systemctl restart evm-failover-monitor | |||
fi | |||
|
|||
# Disable rsyslog duplicating systemd-journal output | |||
# This will comment out the multi-line module load from /etc/rsyslog.conf | |||
sed -i '/^module(load="imjournal"/, /StateFile="imjournal.state")/ s|^|#|' %{_sysconfdir}/rsyslog.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you aren't a sed
expert (which I am not), this means "starting at this regex" (/^module(load="imjournal"/
) until this regex (/StateFile="imjournal.state")/
), substitute the start of the line with #
(s|^|#|
)
Just to clarify. I thought this would prevent them from being written to |
@Fryguy we also pull logs from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - @bdunne Please also review.
Hey @bdunne could you take a look at this? |
This looks great. anything special to help get it in? |
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the |
By default systemd-journal is non-persistent and rsyslog is configured to copy everything from the journal to `/var/log/syslog`. If you have a `/var/log/journal/` directory on persistent storage then systemd-journal will automatically persist journal files but rsyslog doesn't also automatically disable copying to syslog
42dda8e
to
f2bd3c8
Compare
Checked commits agrare/manageiq-rpm_build@cc27bb7~...f2bd3c8 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint |
By default systemd-journal is non-persistent and rsyslog is configured to copy everything from the journal to
/var/log/syslog
.If you have a
/var/log/journal/
directory on persistent storage then systemd-journal will automatically persist journal files but rsyslog doesn't also automatically disable copying to syslogTODO:
Fixes #411