This patch differentiates rsyslogd configurations based on operating system
by defining respective system logfile location and user/group.
Change-Id: If5134278f7aa5e726325be38bb0bf8a560b668e5
Closes-Bug: #1807268
For consistent templating and to avoid unnecessary service restarts,
sort the list of gathered log file names.
Change-Id: I838a791b1241de847f8f03ff5a4f4a3f117b4e43
Since the intent of the role is to stream only specified logs
updated the filter to match local7 facility which the role is setting
for the application logs with "$InputFileFacility local7" in
99-rsyslog.conf.j2 template.
Change-Id: I531652300440d12cb98ada9c6eac44e9d4ab731f
Splitted functionality, one template for generating remote syslog
targets and another for streaming the user specifed log files in
syslog format. This avoids duplcate targets when the role is
invoked mutiple times against a host when installing services.
Change-Id: I53e2faf69c0446bea9738a66ee8585e8d795cf52
logrotate is not sending HUP signal to rsyslog because of invalid
command in postrotate/endscript block. Fixed the command to reload
the rsyslog after the logs are rotated.
Change-Id: Ia1fa205e6f20c212841109c914a8c7e2d379a48b
Two variables have been added, rsyslog_client_log_rotate_options
and rsyslog_client_log_rotate_scripts, to allow deployers to override
and set logrotate config options as they wish.
The os_aggregate_storage.j2 template has also been renamed to
logrotate.j2 to better fit its purpose.
Change-Id: If7538fd2409f3583f22209868f538e01796813c2
The rsyslog_client_log_files role variable was masked by the
rsyslog_client_log_files fact set during the post install task. This
caused the log files set in the rsyslog_client_log_files variable to be
ignored on the second or later invocation of the rsyslog_client role.
Instead the log files discovered from rsyslog_client_dir on previous
runs of the role were add to the list of logfiles. This resulted in
missing rsyslog configurations and duplicate logrotate entries.
Change-Id: I00a58def426a4f30f1e64a24320ee68157b95f24
The copytruncate directive in logrotate configuration truncates the log file so
that processes can keep using the same file descriptor to write to the log
file. The truncation, however, does not work well with rsyslog forwarding as
rsyslog fails to figure out the difference from last sent messages.
This change restarts rsyslogd in postrotate directive of logrotate such as
rsyslog will start with a new baseline and continue forwarding logs.
Closes-Bug: 1564654
Change-Id: Ied15bc73e5af78bfcc1430db787b61d65a9bc044
Signed-off-by: Shu Shen <sshen@siaras.com>
The change adds a conditional to the log rotate template
so that its only rendered when log files are present in the
log file discovery task.
Closes-Bug: 1539210
Change-Id: I3fba6eda958ce4f857dc5f06b5c700cbd3735c89
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
The change moves the role out from the main repo rsyslog_client
repository and into its own standalone repository.
Items within this change:
* The role has been updated to ensure it runs standalone.
* Tests added to the role within tox.
* Functional tests added to the role that can either be run
via the run_tests.sh script or using tox.
* dev requirements have been updated for testing usecases.
* Docs added to both the README.rst file as well as the docs
folder.
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>