Rolling Elasticsearch Logs by Size


#1

Hi,
I am trying to improve management of our elasticsearch logs. To that end I'm trying to implement a policy of rolling the log when it exceeds a certain size and to retain a fixed number of compressed logs. Here is my config:

file:
type: extrasRollingFile
file: ${path.logs}/${cluster.name}.log
rollingPolicy: fixedWindowRollingPolicy
rollingPolicy.FileNamePattern: ${path.logs}/${cluster.name}.log.%d{yyyy-MM-dd}.gz
rollingPolicy.MinIndex: 1
rollingPolicy.MaxIndex: 10
triggeringPolicy: sizeBasedTriggeringPolicy
triggeringPolicy.MaxFileSize: 1000MB
layout:
type: pattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

Of course, this isn't working as nothing is being written to the log. Can someone point me in the right direction to getting this config working please?

Regards,
David


(system) #2