Log4j with ES 5.2 : delete action

Hi Elastic team and users,

I have an Elasticsearch 5.2 install and I would like to configure log4j2 on it.
Specifically, I'm trying to set the a rollover strategy with a delete action, like in ES 5.3 : https://www.elastic.co/guide/en/elasticsearch/reference/5.x/settings.html

However in ES 5.2, the properties "es.logs.base_path" do not exist (https://www.elastic.co/guide/en/elasticsearch/reference/5.x/breaking-changes-5.3.html).
Is there an other way in ES 5.2 to be able to use the "delete action" of a rollover strategy ?
My goal is to remove Elasticsearch logs older that 7 days.

Thanks !

Best regards,

Yes, manually specify the logs path instead of using the system properties. The system properties were introduced in Expose logs base path by jasontedor · Pull Request #22625 · elastic/elasticsearch · GitHub exactly to make it possible to use things like the delete action of the rollover strategy without having to hardcode the path yet you can temporarily hardcode the path until you can migrate to a version where those properties are available. Does that help?

You have to be careful here, if you change path.logs and do not update this hardcoded log path, you can end up in situation where you have no logs. So as soon as you can migrate and start using these system properties, do so!

Great it helps a lot, thank you :slight_smile: !

You're very welcome.

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