Different results when running curator command at command prompt vs as a .bat file in windows

Hi,

Having an issue where I'm seeing different results when I run a curator command as a .bat file than I do when I run the same command manually at a command prompt in windows.

If I run the below manually at a command prompt in windows (as in, paste it into a command prompt and hit enter)

C:\temp\curator-3.3.0-win64\curator-3.3.0\curator.exe --loglevel INFO --dry-run --logfile C:\temp\curator-3.3.0-win64\curator-3.3.0\curator.log --host --timeout 180 delete indices --older-than 1 --time-unit days --timestring %Y.%m.%d --prefix casieo_index-

I get

2015-10-07 12:39:22,724 INFO Job starting: delete indices
2015-10-07 12:39:23,025 INFO Pruning Kibana-related indices to prevent accidental deletion.
2015-10-07 12:39:23,025 INFO DRY RUN MODE. No changes will be made.
2015-10-07 12:39:23,049 INFO DRY RUN: delete: casieo_index-2015.10.04
2015-10-07 12:39:23,082 INFO DRY RUN: delete: casieo_index-2015.10.05

If I put the same command in a .bat file and run it (as an administrator), I get:

2015-10-07 12:37:59,855 WARNING No indices matched provided args: {'index': (), 'regex': None, 'newer_than': None, 'prefix': u'casieo_index-', 'exclude': (), 'time_unit': 'days', 'timestring': u'm.d', 'all_indices': False, 'older_than': 1, 'suffix': None}

The same issue occurs if I pull --dry-run out. If I paste the same exact command (except minus the --dry-run) in at the command prompt and hit enter, I get:

2015-10-07 12:44:45,178 INFO Job starting: delete indices
2015-10-07 12:44:45,338 INFO Pruning Kibana-related indices to prevent accidental deletion.
2015-10-07 12:44:45,338 INFO Deleting indices as a batch operation:
2015-10-07 12:44:45,339 INFO ---deleting index casieo_index-2015.10.04
2015-10-07 12:44:45,339 INFO ---deleting index casieo_index-2015.10.05
2015-10-07 12:44:45,483 INFO Job completed successfully.

If I run the .bat (again, as admin) without the --dry-run, I get:

2015-10-07 12:44:31,247 INFO Job starting: delete indices
2015-10-07 12:44:31,352 INFO Pruning Kibana-related indices to prevent accidental deletion.
2015-10-07 12:44:31,352 WARNING No indices matched provided args: {'exclude': (), 'timestring': u'm.d', 'newer_than': None, 'prefix': u'casieo_index-', 'regex': None, 'older_than': 1, 'index': (), 'suffix': None, 'time_unit': 'days', 'all_indices': False}

Any ideas?

Thanks,
Casie

Try setting --debug to get more info?

I'm attaching a snip of the command ran. I tried to attach all the debug info as a .doc, but this UI won't accept it. And it's too large to include here. There are a few references to the two indices that are caught as relevant when I run this manually. I don't see anything revealing in the log. Here is the end, as much as I can fit. You'll see it does reference the two indices that are caught as relevant if I run this manually, which are: casieo_index-2015.10.05 and casieo_index-2015.10.04:

2015-10-07 15:40:27,519 DEBUG curator.api.utils get_indices:27 All indices: [u'casieo_index', u'.marvel-2015.09.28', u'.marvel-2015.09.29', u'.marvel-2015.09.23', u'.marvel-2015.09.26', u'.marvel-2015.09.27', u'.marvel-2015.09.24', u'.marvel-2015.09.25', u'casieo_index-2015.10.05', u'casieo_index-2015.10.04', u'.marvel-2015.10.02', u'.marvel-2015.10.03', u'.marvel-2015.10.01', u'.marvel-2015.10.06', u'.marvel-2015.10.07', u'.marvel-2015.10.04', u'.marvel-2015.10.05', u'.marvel-2015.09.30', u'.marvel-kibana', u'iplocation_2015.10.06', u'customers-v2', u'customers-v1']
2015-10-07 15:40:27,519 DEBUG curator.cli.index_selection indices:72 Full list of indices: [u'casieo_index', u'.marvel-2015.09.28', u'.marvel-2015.09.29', u'.marvel-2015.09.23', u'.marvel-2015.09.26', u'.marvel-2015.09.27', u'.marvel-2015.09.24', u'.marvel-2015.09.25', u'casieo_index-2015.10.05', u'casieo_index-2015.10.04', u'.marvel-2015.10.02', u'.marvel-2015.10.03', u'.marvel-2015.10.01', u'.marvel-2015.10.06', u'.marvel-2015.10.07', u'.marvel-2015.10.04', u'.marvel-2015.10.05', u'.marvel-2015.09.30', u'.marvel-kibana', u'iplocation_2015.10.06', u'customers-v2', u'customers-v1']
2015-10-07 15:40:27,519 DEBUG curator.cli.index_selection indices:89 All filters: [{'timestring': u'm.d', 'pattern': '(?P\m\.\d)', 'groupname': 'date', 'method': 'older_than', 'time_unit': 'days', 'value': 1}, {'pattern': '^casieo_index-.*'}] 2015-10-07 15:40:27,519 DEBUG curator.cli.index_selection indices:94 Filter: {'timestring': u'm.d', 'pattern': '(?P<date>\\m\\.\\d)', 'groupname': 'date', 'method': 'older_than', 'time_unit': 'days', 'value': 1} 2015-10-07 15:40:27,520 DEBUG curator.cli.index_selection indices:94 Filter: {'pattern': '^casieo_index-.*'}
2015-10-07 15:40:27,520 INFO curator.cli.index_selection indices:98 Pruning Kibana-related indices to prevent accidental deletion.
2015-10-07 15:40:27,520 WARNING curator.cli.index_selection indices:152 No indices matched provided args: {'timestring': u'm.d', 'newer_than': None, 'older_than': 1, 'time_unit': 'days', 'suffix': None, 'all_indices': False, 'index': (), 'exclude': (), 'prefix': u'casieo_index-', 'regex': None}

Just use gist/pastebin/etc and then link to it :slight_smile:

Wow! Didn't know about those! Here you go: http://pastebin.com/KBRDH9yb

Just checking in to see if you have any ideas on this. Thanks.