TTL set and enabled but logs not expiring ...please help

Use delete-by-query

On 15 May 2013 20:17, Aakash Anuj aakashanuj.iitkgp@gmail.com wrote:

You were right I guess....becoz now my logs are getting deleted after the
specified time after the indexing, not the time stamp value. Any idea how
to automatically delete the logs relative to the time stamp value?

On Wednesday, May 15, 2013, Clinton Gormley wrote:

I've just asked, and apparently I'm incorrect. ttl and timestamp ARE
related.

But: i see a "@timestamp" field in your mapping, but no _timestamp path
mapping to point to that field
Elasticsearch Platform — Find real-time answers at scale | Elastic

clint

On 15 May 2013 17:32, Aakash Anuj aakashanuj.iitkgp@gmail.com wrote:

Oh, I guess the last point was where I was fumbling.

I had read on a blog somewhere that the TTL applies relative to the
timestamp. So do you mean that the TTL applies relative to the system time
of creation?

On Wed, May 15, 2013 at 8:55 PM, Clinton Gormley clint@traveljury.comwrote:

On 15 May 2013 16:53, Aakash Anuj aakashanuj.iitkgp@gmail.com wrote:

But how to I drop the indices which are old automatically from the
ELASTIC SEARCH database?

you don't. you use a cron daemon to run a job once a day

And please explain me one more thing.....
When is the file defaul.json loaded, that is, when is the TTL
enabled? Is it when Elasticsearch runs?

Only when you restart a node. And its values only apply when you
create a new index

Also, how do I actually know if the indices get deleted?

You make your cron job send you an email

Even if I add logs which have a TTL of 1 day and a timestamp sometime
before 1 day, they get added to ES. Why ?

The ttl depends on the time you index it, not the timestamp field.

This could explain why things weren't working the way you expected.
Your expectations were incorrect.

Please read this advice about how to ask questions in the best way to
get answers: Elasticsearch Platform — Find real-time answers at scale | Elastic

clint

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/3j77O3pOCRc/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Regards,
Aakash Anuj,
Junior Undergraduate,
Department of Computer Science and Engineering,
Indian Institute of Technology, Kharagpur.

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/3j77O3pOCRc/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Regards,
Aakash Anuj,
Junior Undergraduate,
Department of Computer Science and Engineering,
Indian Institute of Technology, Kharagpur.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.