Curator "no indices matched"


#1

Topic says it...just installed curator and here's the output:

curator delete indices --older-than 90 --time-unit days --timestring '%Y.%m.%d'
2016-02-26 10:45:17,494 INFO Job starting: delete indices
2016-02-26 10:45:17,650 INFO Pruning Kibana-related indices to prevent accidental deletion.
2016-02-26 10:45:17,651 WARNING No indices matched provided args: {'regex': None, 'index': (), 'suffix': None, 'newer_than': None, 'closed_only': False, 'prefix': None, 'time_unit': 'days', 'timestring': u'%Y.%m.%d', 'exclude': (), 'older_than': 90, 'all_indices': False}
No indices matched provided args: {'regex': None, 'index': (), 'suffix': None, 'newer_than': None, 'closed_only': False, 'prefix': None, 'time_unit': 'days', 'timestring': u'%Y.%m.%d', 'exclude': (), 'older_than': 90, 'all_indices': False}

This is on elasticsearch 1.7.4. Thank you.


(Mark Walkom) #2

I think you also need to supply a prefix as well don't you?


(Aaron Mildenstein) #3

No prefix necessary, actually, @warkolm. This should show all indices with a matching timestring and are older than 90 days.

@DigiAngel, please run with the --debug flag immediately after curator and before delete. You should get output which shows all indices found in one of the log lines.


#4

How about this line:

2016-02-26 13:22:34,049 DEBUG curator.api.utils get_indices:29 All indices: [u'logstash-2016.02.19', u'logstash-2016.02.18', u'logstash-2016.02.13', u'logstash-2016.02.12', u'logstash-2016.02.11', u'logstash-2016.02.10', u'logstash-2016.02.17', u'logstash-2016.02.16', u'logstash-2016.02.15', u'logstash-2016.02.14', u'kibana-int', u'logstash-2016.02.08', u'logstash-2016.02.09', u'logstash-2016.02.05', u'logstash-2016.02.06', u'logstash-2016.02.07', u'logstash-2016.02.22', u'logstash-2016.02.23', u'logstash-2016.02.20', u'logstash-2016.02.21', u'logstash-2016.02.26', u'logstash-2016.02.24', u'logstash-2016.02.25']

Maybe since none of these are older than 90 days?


#5

Yep..that's why:

curator delete indices --older-than 9 --time-unit days --timestring '%Y.%m.%d'
2016-02-26 13:26:43,791 INFO Job starting: delete indices
2016-02-26 13:26:43,803 INFO Pruning Kibana-related indices to prevent accidental deletion.
2016-02-26 13:26:43,803 INFO Action delete will be performed on the following indices: [u'logstash-2016.02.17']
2016-02-26 13:26:43,805 INFO Deleting indices as a batch operation:
2016-02-26 13:26:43,805 INFO ---deleting index logstash-2016.02.17
2016-02-26 13:26:44,223 INFO Job completed successfully.

Guess now I know...thanks all!


(Aaron Mildenstein) #6

:smiley: Glad you figured it out!


(system) #7