We have the elk setup on Elastic Cloud and I have a requirement to delete the indices from a curator.
The following code is the curator config:
hosts: [ "asd321asdsa.ap-northeast-1.aws.found.io" ]
blacklist: ['elasticsearch', 'urllib3']
The following code is the action file:
Delete indices older than 30 days (based on index name), for navis-apex-ec2amaz-ul066bg-2019.10.*
prefixed indices. Ignore the error if the filter does not result in an
actionable list of indices (ignore_empty_list) and exit cleanly.
- filtertype: pattern
- filtertype: age
The same action file, works fine with a local cluster(localhost) but not with the ElasticCloud service.
The following was the response after running the curator:
2020-03-06 02:18:41,723 INFO Preparing Action ID: 1, "delete_indices"
2020-03-06 02:18:41,723 INFO Creating client object and testing connection
2020-03-06 02:18:41,726 INFO Instantiating client object
2020-03-06 02:18:41,726 INFO Testing client connectivity
2020-03-06 02:24:18,077 ERROR HTTP N/A error: HTTPSConnectionPool(host='asd321asdsa.ap-northeast-1.aws.found.io', port=9254): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000197C498D160>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))
2020-03-06 02:24:18,077 CRITICAL Curator cannot proceed. Exiting.
Note: The host is modified for security reason.