Elasticsearch curator ( python module) curator_cli not working

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

[root@mdffun09 ~]#
[root@mdffun09 ~]#
[root@mdffun09 ~]# curator_cli --host --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 ~]#

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.

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" ?

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...

1 Like

Indeed, what @kd5dbl said, and with this Curator FAQ added for further clarification.

thank a lot David and Aaron

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