Manage logs files of elasticsearch

(alban) #1


Elasticsearch create log file for graylog (for me, it’s in /var/lib/elasticsearch/log/)

Where it’s manage ? (log4j ?)
Because I would like to delete log files longer than 7 days.

I can create a script but if it is used elsewhere…


(Rpelissi) #2

You can use this page to help you:

Of have logrotate to manage this:

(alban) #3

Thank you.
I added that on

appender.rolling.strategy.type = DefaultRolloverStrategy
appender.rolling.strategy.action.type = Delete
appender.rolling.strategy.action.basepath = {sys:es.logs.base_path} appender.rolling.strategy.action.condition.type = IfFileName appender.rolling.strategy.action.condition.glob = {sys:es.logs.cluster_name}-*
appender.rolling.strategy.action.condition.nested_condition.type = IfLastModified
appender.rolling.strategy.action.condition.nested_condition.age = 7D

It’s running fine.

(system) #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.