# Elasticsearch curator ( python module) curator\_cli not working

**URL:** https://discuss.elastic.co/t/elasticsearch-curator-python-module-curator-cli-not-working/144156
**Category:** Elasticsearch
**Created:** [August 13, 2018, 10:55am UTC](https://discuss.elastic.co/t/elasticsearch-curator-python-module-curator-cli-not-working/144156 "2018-08-13T10:55:33Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![prasadkkl](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@prasadkkl](https://discuss.elastic.co/u/prasadkkl)
#### Post date: [August 13, 2018, 10:55am UTC](https://discuss.elastic.co/t/elasticsearch-curator-python-module-curator-cli-not-working/144156/1 "2018-08-13T10:55:33Z")

</div>

I am using Elasticsearch version : 5.6.10 . I am using python curator\_cli ( version 5.5.4) for deleting indexs only 1 day old. But getting error as "Singleton action failed due to empty index list".

But when we do show indices like below ..working fine..

[root@mdffun09 ~]# curator\_cli show\_indices  
rest

[root@mdffun09 ~]#  
[root@mdffun09 ~]#  
[root@mdffun09 ~]# curator\_cli --host 127.0.0.1 --timeout 300 --port 9200 delete\_indices --filter\_list '[{"filtertype":"age", "source":"name", "direction":"older", "unit":"days", "unit\_count":1, "timestring":"%Y.%m.%d"}]'  
2018-08-13 15:27:39,100 ERROR Singleton action failed due to empty index list  
[root@mdffun09 ~]#  
[root@mdffun09 ~]#  
[root@mdffun09 ~]# curator\_cli show\_indices --filter\_list '[{"filtertype":"age","source":"name","direction":"older","unit":"minutes","unit\_count":5,"timestring": "%Y.%m.%d"},{"filtertype":"pattern","kind":"prefix","value":"monthly"}]'  
2018-08-13 16:16:09,241 ERROR Singleton action failed due to empty index list  
[root@mdffun09 ~]#

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [August 13, 2018, 11:13am UTC](https://discuss.elastic.co/t/elasticsearch-curator-python-module-curator-cli-not-working/144156/2 "2018-08-13T11:13:26Z")

</div>

The `show_indices` command only shows a single index called `rest`. The filter you are employing in the other example should only show indices with a year.month.day (`%Y.%m.%d`) pattern. Since `rest` does not have this in the name, the list is empty. That’s what the log output message means.

---

<div class="post-metadata">

### Author: ![prasadkkl](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@prasadkkl](https://discuss.elastic.co/u/prasadkkl)
#### Post date: [August 14, 2018, 11:36am UTC](https://discuss.elastic.co/t/elasticsearch-curator-python-module-curator-cli-not-working/144156/3 "2018-08-14T11:36:33Z")

</div>

thanks.... But i have below indexs

[root@mdffun09 ES]# curl 'localhost:9200/\_cat/indices?v'  
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size  
yellow open rest PAelfqyxRG23zz5S3evbsQ 5 1 24 0 125.8kb 125.8kb

Here "rest" index contains 24 documents.... I need to delete documents all the documents which are 2 days older.... what is the --filter\_list need to be used for "curator\_cli show\_indices" ?

---

<div class="post-metadata">

### Author: ![kd5dbl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kd5dbl/32/10450_2.png) [@kd5dbl](https://discuss.elastic.co/u/kd5dbl)
#### Post date: [August 14, 2018, 11:42am UTC](https://discuss.elastic.co/t/elasticsearch-curator-python-module-curator-cli-not-working/144156/4 "2018-08-14T11:42:06Z")

</div>

That's not how curator works...

Curator will only delete full indices that match your search criteria... If you want to delete aged documents within an index, there are search and delete options within the elastic API do that. I will tell you from experience, if you have a large indexes that you want to do this on, it's really slow.

Best advice is to have your indexes be time based rest-2018.08.01, rest-2018.08.2, etc and then have curator delete the whole index. Deleting a whole index is quick...

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [August 14, 2018, 12:00pm UTC](https://discuss.elastic.co/t/elasticsearch-curator-python-module-curator-cli-not-working/144156/5 "2018-08-14T12:00:17Z")

</div>

Indeed, what @kd5dbl said, and with [this Curator FAQ added](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.5/faq_partial_delete.html) for further clarification.

---

<div class="post-metadata">

### Author: ![prasadkkl](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@prasadkkl](https://discuss.elastic.co/u/prasadkkl)
#### Post date: [August 14, 2018, 12:07pm UTC](https://discuss.elastic.co/t/elasticsearch-curator-python-module-curator-cli-not-working/144156/6 "2018-08-14T12:07:33Z")

</div>

thank a lot David and Aaron

---

<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: [September 11, 2018, 12:07pm UTC](https://discuss.elastic.co/t/elasticsearch-curator-python-module-curator-cli-not-working/144156/7 "2018-09-11T12:07:34Z")

</div>

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