How can we run a delete on both --prefix .marvel- and --prefix .logstash- in one command?
Trying:
curator delete --older-than 60 --prefix .marvel- --prefix .logstash-
Does not find any indexes.
Multiple prefixes is not supported. However, regular expressions for --prefix _are_ supported:
$ curator -n delete --older-than 10 --prefix '(?:logstash-|.marvel-)'
2014-10-27 11:20:31,116 INFO Job starting...
2014-10-27 11:20:31,117 INFO DRY RUN MODE. No changes will be made.
2014-10-27 11:20:31,120 INFO DRY RUN: Deleting indices...
2014-10-27 11:20:31,131 INFO DRY RUN: of delete_index operation on .marvel-2014.10.13
2014-10-27 11:20:31,131 INFO DRY RUN: of delete_index operation on .marvel-2014.10.14
2014-10-27 11:20:31,131 INFO DRY RUN: of delete_index operation on .marvel-2014.10.15
2014-10-27 11:20:31,131 INFO DRY RUN: of delete_index operation on .marvel-2014.10.16
2014-10-27 11:20:31,131 INFO DRY RUN: of delete_index operation on .marvel-2014.10.17
2014-10-27 11:20:31,131 INFO .marvel-2014.10.18 is within the threshold period (10 days).
2014-10-27 11:20:31,132 INFO .marvel-2014.10.19 is within the threshold period (10 days).
2014-10-27 11:20:31,132 INFO .marvel-2014.10.20 is within the threshold period (10 days).
2014-10-27 11:20:31,132 INFO .marvel-2014.10.21 is within the threshold period (10 days).
2014-10-27 11:20:31,132 INFO .marvel-2014.10.22 is within the threshold period (10 days).
2014-10-27 11:20:31,132 INFO .marvel-2014.10.23 is within the threshold period (10 days).
2014-10-27 11:20:31,132 INFO .marvel-2014.10.24 is within the threshold period (10 days).
2014-10-27 11:20:31,132 INFO .marvel-2014.10.25 is within the threshold period (10 days).
2014-10-27 11:20:31,133 INFO .marvel-2014.10.26 is within the threshold period (10 days).
2014-10-27 11:20:31,133 INFO .marvel-2014.10.27 is within the threshold period (10 days).
2014-10-27 11:20:31,133 INFO DRY RUN: of delete_index operation on logstash-2014.10.13
2014-10-27 11:20:31,133 INFO DRY RUN: of delete_index operation on logstash-2014.10.14
2014-10-27 11:20:31,133 INFO DRY RUN: of delete_index operation on logstash-2014.10.15
2014-10-27 11:20:31,133 INFO DRY RUN: of delete_index operation on logstash-2014.10.16
2014-10-27 11:20:31,133 INFO DRY RUN: of delete_index operation on logstash-2014.10.17
2014-10-27 11:20:31,134 INFO logstash-2014.10.18 is within the threshold period (10 days).
2014-10-27 11:20:31,134 INFO logstash-2014.10.19 is within the threshold period (10 days).
2014-10-27 11:20:31,134 INFO logstash-2014.10.20 is within the threshold period (10 days).
2014-10-27 11:20:31,134 INFO logstash-2014.10.21 is within the threshold period (10 days).
2014-10-27 11:20:31,134 INFO logstash-2014.10.22 is within the threshold period (10 days).
2014-10-27 11:20:31,134 INFO logstash-2014.10.23 is within the threshold period (10 days).
2014-10-27 11:20:31,134 INFO logstash-2014.10.24 is within the threshold period (10 days).
2014-10-27 11:20:31,135 INFO logstash-2014.10.25 is within the threshold period (10 days).
2014-10-27 11:20:31,135 INFO logstash-2014.10.26 is within the threshold period (10 days).
2014-10-27 11:20:31,135 INFO logstash-2014.10.27 is within the threshold period (10 days).
2014-10-27 11:20:31,135 INFO DRY RUN: Speficied indices deleted.
2014-10-27 11:20:31,135 INFO Done in 0:00:00.051619.
So you can accomplish this with --prefix '(?:logstash-|.marvel-)' which has a logical OR between logstash- and .marvel-.
If this is an acceptable answer, please go ahead and close the issue. I'll close it in a few days otherwise.
@untergeek Perfect, exactly what we needed. Thanks.
Most helpful comment
Multiple prefixes is not supported. However, regular expressions for
--prefix_are_ supported:So you can accomplish this with
--prefix '(?:logstash-|.marvel-)'which has a logical OR betweenlogstash-and.marvel-.If this is an acceptable answer, please go ahead and close the issue. I'll close it in a few days otherwise.