Delete indices now working

I tried following command with curator cli

curator_cli --host ray-elasticsearch-service delete_indices --filter_list '{"filtertype":"age","source":"name","timestring":"%Y.%m.%d","unit":"days","unit_count"
:1,"direction":"older"}'

and the output which i got is

:1,"direction":"older"}'
{"@timestamp": "2019-05-31T11:21:49.906Z", "function": "do_action",
 "linenum": 525, "loglevel": "INFO",
 "message": "Deleting selected indices: [u'logs-2019.03.08', u'logs-2019.03.09', u'metrics-2019.03.30', u'metrics-2019.03.31', u'logs-2019.04.25', u'metrics-2019.05.12', u'logs-2019.03.01', u'logs-2019.03.02', u'logs-2019.03.03', u'logs-2019.03.04'
, u'logs-2019.03.05', u'logs-2019.03.06', u'logs-2019.03.07', u'logs-2019.05.11', u'metrics-2019.03.17', u'metrics-2019.03.21', u'metrics-2019.03.20', u'metrics-2019.03.10', u'logs-2019.03.27', u'metrics-2019.03.12', u'logs-2019.03.25'
, u'logs-2019.03.28', u'logs-2019.03.29', u'metrics-2019.03.18', u'metrics-2019.03.19', u'metrics-2019.02.17', u'metrics-2019.02.16', u'metrics-2019.02.15', u'logs-2019.04.28', u'logs-2019.04.17', u'logs-2019.04.23', u'logs-2019.04.22', u'logs-2019.04.21', u'logs-2019.04.20', u'logs-2019.04.27', u'logs-2019.04.26', u'metrics-2019.02.19', u'metrics-2019.02.18', u'metrics-2019.04.08', u'metrics-2019.04.09', u'metrics-2019.04.02', u'metrics-2019.05.09', u'metrics-2019.04.01', u'metrics-2019.04.06', u'metrics-2019.04.07', u'metrics-2019.04.04', u'metrics-2019.04.05', u'logs-2019.02.18', u'logs-2019.02.19', u'logs-2019.02.15', u'logs-2019.02.16', u'logs-2019.02.17', u'metrics-2019.03.24', u'metrics-2019.03.09', u'metrics-2019.03.08', u'metrics-2019.03.03', u'metrics-2019.03.02', u'metrics-2019.03.01', u'metrics-2019.03.07', u'metrics-2019.03.06', u'metrics-2019.03.05', u'metrics-2019.03.04', u'logs-2019.04.03', u'logs-2019.04.30', u'metrics-2019.05.19', u'metrics-2019.04.03', u'metrics-2019.04.19', u'metrics-2019.04.18', u'metrics-2019.04.11', u'metrics-2019.04.10', u'metrics-2019.04.13', u'metrics-2019.04.12', u'metrics-2019.04.15', u'metrics-2019.04.14', u'metrics-2019.04.17', u'metrics-2019.04.16', u'logs-2019.02.28', u'logs-2019.02.21', u'logs-2019.02.20', u'logs-2019.02.23', u'logs-2019.02.22', u'logs-2019.02.25', u'logs-2019.02.24', u'logs-2019.02.27', u'logs-2019.04.08', u'metrics-2019.03.15', u'logs-2019.04.24', u'logs-2019.04.05', u'logs-2019.04.04', u'logs-2019.04.07', u'logs-2019.04.06', u'logs-2019.04.01', u'metrics-2019.05.18', u'logs-2019.04.02', u'metrics-2019.05.16', u'metrics-2019.05.17', u'metrics-2019.05.14', u'metrics-2019.05.15', u'logs-2019.04.09', u'metrics-2019.05.13', u'metrics-2019.05.10', u'metrics-2019.05.11', u'metrics-2019.04.28', u'metrics-2019.04.29', u'logs-2019.05.30', u'metrics-2019.04.24', u'metrics-2019.04.25', u'metrics-2019.04.26', u'metrics-2019.04.27', u'metrics-2019.04.20', u'metrics-2019.04.21', u'metrics-2019.04.22', u'metrics-2019.04.23', u'metrics-2019.04.30', u'logs-2019.04.12', u'logs-2019.04.13', u'logs-2019.04.10', u'logs-2019.04.11', u'logs-2019.04.16', u'metrics-2019.05.08', u'logs-2019.04.14', u'logs-2019.04.15', u'metrics-2019.05.05', u'metrics-2019.05.04', u'metrics-2019.05.07', u'logs-2019.04.19', u'metrics-2019.05.01', u'logs-2019.03.20', u'metrics-2019.05.03', u'metrics-2019.05.02', u'logs-2019.05.24', u'logs-2019.05.25', u'logs-2019.05.26', u'logs-2019.05.27', u'logs-2019.05.20', u'logs-2019.05.21', u'logs-2019.05.22', u'logs-2019.05.23', u'logs-2019.03.26', u'logs-2019.05.28', u'logs-2019.05.29', u'metrics-2019.03.11', u'logs-2019.03.24', u'metrics-2019.03.13', u'metrics-2019.02.28', u'metrics-2019.02.26', u'metrics-2019.02.27', u'metrics-2019.02.24', u'metrics-2019.02.25', u'metrics-2019.02.22', u'metrics-2019.02.23', u'metrics-2019.02.20', u'metrics-2019.02.21', u'metrics-2019.05.30', u'logs-2019.05.10', u'logs-2019.05.13', u'logs-2019.05.12', u'logs-2019.05.15', u'logs-2019.05.14', u'logs-2019.05.17', u'logs-2019.05.16', u'logs-2019.05.19', u'logs-2019.05.18', u'logs-2019.04.29', u'logs-2019.03.19', u'logs-2019.03.18', u'logs-2019.03.13', u'logs-2019.03.12', u'logs-2019.03.11', u'logs-2019.03.10', u'logs-2019.03.17', u'logs-2019.03.16', u'logs-2019.03.15', u'logs-2019.03.14', u'logs-2019.05.08', u'logs-2019.05.09', u'logs-2019.05.06', u'logs-2019.05.07', u'logs-2019.05.04', u'logs-2019.05.05', u'logs-2019.05.02', u'logs-2019.05.03', u'logs-2019.05.01', u'metrics-2019.05.27', u'metrics-2019.05.26', u'metrics-2019.05.25', u'metrics-2019.05.24', u'metrics-2019.05.23', u'metrics-2019.05.22', u'metrics-2019.05.21', u'metrics-2019.05.20', u'logs-2019.03.31', u'metrics-2019.05.29', u'metrics-2019.05.28']", "name": "curator.actions.delete_indices"}
{"@timestamp": "2019-05-31T11:21:49.906Z", "function": "__chunk_loop", "linenum": 500, "loglevel": "INFO", "message": "---deleting index logs-2019.03.08", "name": "curator.actions.delete_indices"}
{"@timestamp": "2019-05-31T11:21:49.907Z", "function": "__chunk_loop", "linenum": 500, "loglevel": "INFO", "message": "---deleting index logs-2019.03.09", "name": "curator.actions.delete_indices"}
{"@timestamp": "2019-05-31T11:21:49.907Z", "function": "__chunk_loop", "linenum": 500, "loglevel": "INFO", "message": "---deleting index metrics-2019.03.30", "name": "curator.actions.delete_indices"}
{"@timestamp": "2019-05-31T11:21:49.907Z", "function": "__chunk_loop", "linenum": 500, "loglevel": "INFO", "message": "---deleting index metrics-2019.03.31", "name": "curator.actions.delete_indices"}
{"@timestamp": "2019-05-31T11:21:49.907Z", "function": "__chunk_loop", "linenum": 500, "loglevel": "INFO", "message": "---deleting index logs-2019.04.25", "name": "curator.actions.delete_indices"}
{"@timestamp": "2019-05-31T11:21:49.907Z", "function": "__chunk_loop", "linenum": 500, "loglevel": "INFO", "message": "---deleting index metrics-2019.05.12", "name": "curator.actions.delete_indices"}
{"@timestamp": "2019-05-31T11:21:49.907Z", "function": "__chunk_loop", "linenum": 500, "loglevel": "INFO", "message": "---deleting index logs-2019.03.01", "name": "curator.actions.delete_indices"}

{"@timestamp": "2019-05-31T11:28:37.275Z", "function": "_actionator", "linenum": 78, "loglevel": "ERROR", "message": "Failed to complete action: delete_indices.  <class 'curator.exceptions.FailedExecution'>: Exception encountered.  Rerun with loglevel DEBUG and/or check Elasticsearch logs for more information. Exception: TransportError(404, u'index_not_found_exception', u'no such index')", "name": "curator.singletons"}

Whats wrong with this could not understand .

Output of curl -XGET 'localhost:9200/_cat/indices?v'

health status index              uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   logs-2019.04.05    mnyJz9tbQh-UNEH8UWN-Mw   5   1     260919            0     44.8mb         44.8mb
yellow open   metrics-2019.03.31 e0-xxqLGR6GnHEK57Rv5GA   5   1     915840            0      153mb          153mb
yellow open   logs-2019.03.05    xpLdUgjSQP6vydPW5wGSCg   5   1     283943            0     61.6mb         61.6mb
yellow open   metrics-2019.03.26 Wz4mvAwNQROHW3d_x6G3qw   5   1    1033481            0    175.7mb        175.7mb
yellow open   metrics-2019.04.14 hsex4DRfROGoSn8yp6TN4g   5   1     771840            0    131.3mb        131.3mb
yellow open   metrics-2019.02.25 BUsi8KgkRo6iKadFQtMTVw   5   1     793314            0    146.5mb        146.5mb
yellow open   metrics-2019.02.22 veX8MU-ARGqe0Lu10p8fHA   5   1     792686            0    141.2mb        141.2mb
yellow open   logs-2019.05.30    ZYK4ZwfQSUCMCux9Q5AEMw   5   1    1657317            0    322.5mb        322.5mb
yellow open   logs-2019.03.10    huuA-YT0T9qy3r1SGzC9Xw   5   1     232123            0     38.4mb         38.4mb
yellow open   metrics-2019.05.08 0DnyEH4kQI2XuX8_Tt7y8g   5   1     786159            0    143.1mb        143.1mb
yellow open   alerts             u14NDzWCSh2fUJ4BDXWkmg   5   1         95            0    323.5kb        323.5kb
yellow open   metrics-2019.03.04 S5RwvoCESciyPHQ3HKw3OQ   5   1     673231            0    130.6mb        130.6mb
yellow open   logs-2019.03.08    qTHORsaBQ62wHqiSnmyW1w   5   1     356751            0     78.6mb         78.6mb
yellow open   metrics-2019.05.15 Ey2W22zMThKpk_K9F7IXzg   5   1     786511            0      134mb          134mb
yellow open   logs-2019.04.16    qwx7hvozS1i5gtLa2yKVHA   5   1    1047303            0    186.4mb        186.4mb
yellow open   metrics-2019.04.07 M1piim69T7aaanWPNtZ5TQ   5   1     915840            0    154.1mb        154.1mb
yellow open   metrics-2019.03.19 gS11eAqVRHWNNlPMgg8B8A   5   1     794880            0      141mb          141mb
yellow open   logs-2019.03.22    y6JwlwUBQq6Ly7oF68qQhQ   5   1     229309            0     41.5mb         41.5mb
yellow open   metrics-2019.03.10 GDtdUlQdTBy_xPxjHSaqzA   5   1     794880            0    137.2mb        137.2mb
yellow open   alerts_silence     zijy4mM7T9Kp0-7CWQ25Og   5   1         95            0     91.1kb         91.1kb
yellow open   logs-2019.03.29    OcPwRDCrQgGnJXaKQ40Tgg   5   1     242648            0     42.9mb         42.9mb
yellow open   metrics-2019.05.19 MAOnBLWlTJO1PgpYDOJktA   5   1     786240            0    126.8mb        126.8mb
yellow open   metrics-2019.03.02 ABAyC9O1SFSrEkycel9JwQ   5   1     673920            0    126.4mb        126.4mb
yellow open   metrics-2019.03.30 kytYLjIeR_adu0TIOOCRww   5   1     915840            0      155mb          155mb
yellow open   logs-2019.03.23    VaB_EQqaSvCS0opey6wIEA   5   1     230441            0       37mb           37mb
yellow open   logs-2019.03.30    s5IKzggQRsiKQ5Annnt4gw   5   1     230128            0     37.2mb         37.2mb
yellow open   metrics-2019.04.08 qtOW10z3QhWUfQvxROI99Q   5   1     915840            0    160.1mb        160.1mb
yellow open   logs-2019.04.17    8xsuPZX2RDCQ_yvnyLqNFA   5   1    1649978            0    280.7mb        280.7mb
yellow open   logs-2019.02.16    Age0XrJzSqyyBV5Hm_4LxA   5   1     175462            0     39.4mb         39.4mb
yellow open   metrics-2019.05.06 DLy2E2FLTSy-pqbQq6UNxQ   5   1     786316            0    145.6mb        145.6mb
yellow open   logs-2019.03.12    65OzKYgzR86oHYhnErTy-Q   5   1     334761            0       79mb           79mb
yellow open   metrics-2019.03.05 M6R3olFyQxCCc3inUcoORg   5   1     742834            0    143.8mb        143.8mb
yellow open   logs-2019.03.18    vGRPsYzRQTmZJ7RAaURNcg   5   1     296288            0       58mb           58mb
yellow open   metrics-2019.04.10 QOFKZnZNScm3E0EaiZTJHA   5   1     794976            0    147.5mb        147.5mb
yellow open   logs-2019.03.03    1a8yYQsXRvmF_XHyu5-GRQ   5   1     257352            0     98.6mb         98.6mb

When i tried with yml

{"@timestamp": "2019-05-31T11:11:32.227Z", "function": "run", "linenum": 173, "loglevel": "INFO", "message": "Skipping action \"delete_indices\" due to empty list: <class 'curator.exceptions.NoIndices'>", "name": "curator.cli"}
{"@timestamp": "2019-05-31T11:11:32.228Z", "function": "run", "linenum": 194, "loglevel": "INFO", "message": "Action ID: 1, \"delete_indices\" completed.", "name": "curator.cli"}
{"@timestamp": "2019-05-31T11:11:32.228Z", "function": "run", "linenum": 195, "loglevel": "INFO", "message": "Job completed.", "name": "curator.cli"}

This is My filter in yaml

actions:
  1:
    action: delete_indices
    description: >-
      Delete indices older than <unit_count> days (based on index name), for custom-
      prefixed indices. Ignore the error if the filter does not result in an
      actionable list of indices (ignore_empty_list) and exit cleanly.
    options:
      ignore_empty_list: True
      continue_if_exception: False
    filters:
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 300



Am i missing here anything ?

This error is uncommon, but tends to happen when Elasticsearch is so busy it times out during the delete operation. The urllib3 component used by Curator will immediately retry the delete operation. If the index turns out to have completed deletion before this retry, this message will be the result.

Your index list has no indices older than 300 days, so the list of indices to delete was empty. That's what this error message means.

Thank you

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