What I wanted to see if it cleans my logs to leave disk space or am I understanding the wrong concept of how curator works? Because When I go to Kibana I can still look for logs older then 5 days I thought it would of deleted it.
Have you tried running it by hand? Because I'd expect Curator to complain about the command line syntax. The command should resemble curator delete indices --older-than 5 --time-unit days.
To keep track of what Curator actually does, use the --logfile option to have it log everything to a file.
That guide is obsolete and won't work with Curator 3.0 and later.
What do you mean running it by hand?
I mean running the command in a terminal and making sure it works as expected before sticking it in a cron job. And again, make sure you use --logfile to get a log from the execution. I enable debug-level logging, enable the Logstash log format, and push the logs into Elasticsearch.
A line in a user's crontab file always starts with a five-column specification of when to run the job. Study the article you used from the beginning and what you initially had in your crontab.
Hi there Magnus Thanks for the reply So I think I have figured it out on my crontab -e correct me if im wrong
* * * * * /usr/local/bin/curator delete indices --older-than 1 --time-unit days --timestring '\%Y.\%m.\%d'
which this indicates to run every minute to delete any logs older then one day
I ran this command to see if cron was working which it was deleted all my logs besides today.
Next Now That i know it works I run
20 0 * * * /usr/local/bin/curator delete indices --older-than 7 --time-unit days --timestring '\%Y.\%m.\%d'
This line indicates to run curator at 20 minutes past midnight and delete any logs older then 7 days
So if I have logged day 1,2,3,4,5,6,7 and when day 8 logs curator should delete the day 1 log at 20min past midnight?
So the next day it should be logs 2,3,4,5,6,7,8?
hey while running this command (curator delete indices --older-than 5 --time-unit days) am getting the following error (Error: no such option: --older-than)
what to do?
It's not possible to upgrade from 3 to 4 by accident if you installed via YUM or APT as the repositories are different. I presume it may have happened via a pip upgrade statement.
You can downgrade with pip install -U elasticsearch-curator==3.5.1
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.