Cron+curator+logrotate are not work?

l made a schedule for delete old logs from elasticsearch.
The command is that 30 0 * * * curator delete indices --time-unit days --timestring '%Y.%m.%d' --older-than 270

but the command doesn't wokr and even the logrotate doesn't work for elasticsearch log

/var/log/elasticsearch/* {
rotate 12

curator version is 3.3.0
python version 2.6.6

So, Curator's current release version is 5.8.3. Python 2.7 has been EOL for over a year (December 31, 2019).

I'm not sure what your environment is, but neither of those is supported anymore. I'm happy to help if you upgrade to recent versions.

1 Like

Sir.Logrotate doesn't work for elasticsearch logs . What may be reason?
for example my elasticsearch log file directory is /var/log/elasticsearch/ there are such files elasticsearch.log.2010-01-05

how l must to write director for logrotate

I have no idea what version of Elasticsearch you are using, and still have no idea which version of Linux you are using (given the extremely outdated version of Python).

Elasticsearch should not be configured to rotate logs via logrotate, but with Elasticsearch's own logging configuration. These instructions are for the most recent release (7.10 at this writing) of Elasticsearch.

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