6853f52c5c
In order to fully wrap up the Elasticsearch configuration including log management, this commit moves all the Elasticsearch related stuff from the manifest into a new Puppet module lma_logging_analytics::elasticsearch. Closes-bug: #1572929 Change-Id: I3dd6d027d2b1de3d6ae3baa01a92dbca1d0ff95b
23 lines
639 B
Plaintext
23 lines
639 B
Plaintext
# managed by puppet
|
|
<%= @logs_dir %>/*.log {
|
|
# Elasticsearch cannot be told to close its log file and re-open it so we need to
|
|
# use the copytruncate option
|
|
copytruncate
|
|
compress
|
|
delaycompress
|
|
missingok
|
|
notifempty
|
|
# logrotate allows to use only year, month, day and unix epoch
|
|
dateext
|
|
dateformat -%Y%m%d-%s
|
|
# number of rotated files to keep
|
|
rotate 10
|
|
# do not rotate files unless both size and time conditions are met
|
|
hourly
|
|
minsize 20M
|
|
# force rotate if filesize exceeded 100M
|
|
maxsize 100M
|
|
# this must map the /var/log directory group ownership
|
|
su root syslog
|
|
}
|