# TTL enabled but logs not expiring

**URL:** <https://discuss.elastic.co/t/ttl-enabled-but-logs-not-expiring/11972>\
**Category:** Elasticsearch\
**Created:** [May 15, 2013, 11:13am UTC](https://discuss.elastic.co/t/ttl-enabled-but-logs-not-expiring/11972 "2013-05-15T11:13:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aakashanuj](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@aakashanuj](https://discuss.elastic.co/u/aakashanuj)\
**Post date:** [May 15, 2013, 11:13am UTC](https://discuss.elastic.co/t/ttl-enabled-but-logs-not-expiring/11972/1 "2013-05-15T11:13:11Z")

</div>

I have TTL enabled, but the logs are not removed when I view them from  
Kibana. They still show up, even after their expiration time is over.  
Here is the mapping that I get from the API, which clearly shows that the  
TTL is enabled with a default value of 1 day:

{"logstash-2013.05.14":{"_default_":{"\_ttl":{"enabled":true,"default":86400000},"properties":{}},"filetype":{"\_ttl":{"enabled":true,"default":86400000},"properties":{"@fields":{"properties":{"\_second":{"type":"string"},"fiber1":{"type":"string"},"fiber2":{"type":"string"},"hour":{"type":"string"},"message":{"type":"string"},"minute":{"type":"string"},"monthday":{"type":"string"},"monthnum":{"type":"string"},"second":{"type":"string"},"slave":{"type":"string"},"ts":{"type":"string"},"type1":{"type":"string"},"type2":{"type":"string"},"year":{"type":"string"}}},"@message":{"type":"string"},"@source":{"type":"string"},"@source\_host":{"type":"string"},"@source\_path":{"type":"string"},"@tags":{"type":"string"},"@timestamp":{"type":"date","format":"dateOptionalTime"},"@type":{"type":"string"}}}},"logstash-2013.05.09":{"_default_":{"\_ttl":{"enabled":true,"default":86400000},"properties":{}},"filetype":{"\_ttl":{"enabled":true,"default":86400000},"properties":{"@fields":{"properties":{"\_second":{"type":"string"},"fiber1":{"type":"string"},"fiber2":{"type":"string"},"hour":{"type":"string"},"message":{"type":"string"},"minute":{"type":"string"},"monthday":{"type":"string"},"monthnum":{"type":"string"},"second":{"type":"string"},"slave":{"type":"string"},"ts":{"type":"string"},"type1":{"type":"string"},"type2":{"type":"string"},"year":{"type":"string"}}},"@message":{"type":"string"},"@source":{"type":"string"},"@source\_host":{"type":"string"},"@source\_path":{"type":"string"},"@tags":{"type":"string"},"@timestamp":{"type":"date","format":"dateOptionalTime"},"@type":{"type":"string"}}}}}

Where am I going wrong? I am badly stuck here ☹

Please give valuable suggestions and help

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:36am UTC](https://discuss.elastic.co/t/ttl-enabled-but-logs-not-expiring/11972/2 "2017-07-06T02:36:33Z")

</div>


