I'm attempting to write a python code that will perform the actions that I'm currently doing in the curator-cli. The goal is to have Lambda that will perform several actions that are related but not restricted to ELK and Curator.
Some actions I was able to perform while others are not clear as to why they aren't working.
For example, snapshots are successful, but any indices actions fails.
Using this code:
client = elasticsearch.Elasticsearch() ilo = curator.IndexList(client) print(ilo)
This will print all the indices, but if I'll do:
ilo = curator.IndexList(client).filter_by_regex(kind='prefix', value='kubernetes-') curator.Replicas(ilo,count='2').do_action()
It will fail with:
TypeError: Not an IndexList object. Type: <type 'NoneType'>.