Add option for enabling rsyslog reopenOnTruncate
reopenOnTruncate ensures rsyslog immediately recognizes when a logrotation happens on a file. When not on, rsyslog will wait for a log file to fill to its original capacity before consuming any additional logs.
Setting this here will ensure that every service configured to work with rsyslog will have this parameter. Default to off because this is an experimental feature
Depends-On: https://review.opendev.org/c/openstack/puppet-tripleo/+/793928
(cherry picked from commit 4872e36c0a
)
Change-Id: Ifd2afe69f01afb799b5693a1d6971904ca50f5bc
This commit is contained in:
parent
42f59769fe
commit
a76bd1a69b
@ -34,6 +34,10 @@ parameters:
|
|||||||
default: {}
|
default: {}
|
||||||
description: Parameters specific to the role
|
description: Parameters specific to the role
|
||||||
type: json
|
type: json
|
||||||
|
RsyslogReopenOnTruncate:
|
||||||
|
default: false
|
||||||
|
description: Rsyslog imfile reopenOnTruncate parameter
|
||||||
|
type: boolean
|
||||||
RsyslogElasticsearchSetting:
|
RsyslogElasticsearchSetting:
|
||||||
default: {}
|
default: {}
|
||||||
description: Configuration for rsyslog-elasticsearch plugin
|
description: Configuration for rsyslog-elasticsearch plugin
|
||||||
@ -70,7 +74,6 @@ conditions:
|
|||||||
- equals: [{get_param: RsyslogElasticsearchTlsCACert}, '']
|
- equals: [{get_param: RsyslogElasticsearchTlsCACert}, '']
|
||||||
- equals: [{get_param: RsyslogElasticsearchTlsClientCert}, '']
|
- equals: [{get_param: RsyslogElasticsearchTlsClientCert}, '']
|
||||||
- equals: [{get_param: RsyslogElasticsearchTlsClientKey}, '']
|
- equals: [{get_param: RsyslogElasticsearchTlsClientKey}, '']
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
role_data:
|
role_data:
|
||||||
description: Role data for the rsyslog role.
|
description: Role data for the rsyslog role.
|
||||||
@ -179,7 +182,6 @@ outputs:
|
|||||||
outname: region
|
outname: region
|
||||||
value: {get_param: KeystoneRegion}
|
value: {get_param: KeystoneRegion}
|
||||||
format: jsonf
|
format: jsonf
|
||||||
|
|
||||||
tripleo::profile::base::logging::rsyslog::elasticsearch:
|
tripleo::profile::base::logging::rsyslog::elasticsearch:
|
||||||
map_merge:
|
map_merge:
|
||||||
- {get_param: RsyslogElasticsearchSetting}
|
- {get_param: RsyslogElasticsearchSetting}
|
||||||
@ -187,6 +189,10 @@ outputs:
|
|||||||
searchIndex: rsyslog-node-index
|
searchIndex: rsyslog-node-index
|
||||||
dynSearchIndex: "on"
|
dynSearchIndex: "on"
|
||||||
errorfile: '/var/log/rsyslog/omelasticsearch.log'
|
errorfile: '/var/log/rsyslog/omelasticsearch.log'
|
||||||
|
- if:
|
||||||
|
- {get_param: RsyslogReopenOnTruncate}
|
||||||
|
- tripleo::profile::base::logging::rsyslog::reopen_on_truncate: "on"
|
||||||
|
- {}
|
||||||
- if:
|
- if:
|
||||||
- use_tls
|
- use_tls
|
||||||
- tripleo::profile::base::logging::rsyslog::elasticsearch_tls_ca_cert: {get_param: RsyslogElasticsearchTlsCACert}
|
- tripleo::profile::base::logging::rsyslog::elasticsearch_tls_ca_cert: {get_param: RsyslogElasticsearchTlsCACert}
|
||||||
|
Loading…
Reference in New Issue
Block a user