Skip to content

Instantly share code, notes, and snippets.

@rmeleromira
Last active May 8, 2018 16:14
Show Gist options
  • Save rmeleromira/ebbfd1f494d4a5b2998563d69a1215e7 to your computer and use it in GitHub Desktop.
Save rmeleromira/ebbfd1f494d4a5b2998563d69a1215e7 to your computer and use it in GitHub Desktop.
root@log01:~# curator_cli --dry-run --host log01 delete_indices --filter_list '[{"filtertype":"pattern","kind":"regex","value":"^(log|notification)-.*$"},{"direction": "older", "exclude": "null", "filtertype": "age", "source": "name", "timestring": "%Y.%m.%d"}]'
2018-05-07 16:44:49,884 ERROR Schema error: expected bool for dictionary value @ data['exclude']
2018-05-07 16:44:49,884 ERROR Schema error: Configuration: filter: Location: singleton, filter #1: {'direction': 'older', 'exclude': 'null', 'filtertype': 'age', 'source': 'name', 'timestring': '%Y.%m.%d'}: Bad Value: "null", expected bool for dictionary value @ data['exclude']. Check configuration file.
actions:
1:
{action: delete_indices, description: Delete indices older than 31 days (based on
index name)., filters: [{exclude: null, filtertype: pattern, kind: regex, value: ^(log|notification)-.*$},
{direction: older, exclude: null, filtertype: age, source: name, timestring: '%Y.%m.%d',
unit: days, unit_count: 31}], options: {continue_if_exception: false, disable_action: false,
ignore_empty_list: true, timeout_override: null}}
2:
{action: delete_indices, description: Delete indices older than 31 days (based on
index name)., filters: [{exclude: null, filtertype: pattern, kind: regex, value: ^events_.*$},
{direction: older, exclude: null, filtertype: age, source: name, timestring: '%Y-%m-%d',
unit: days, unit_count: 31}], options: {continue_if_exception: false, disable_action: false,
ignore_empty_list: true, timeout_override: null}}
root@log01:~# curator_cli --dry-run --host log02 delete_indices --filter_list '[{"filtertype":"pattern","kind":"regex","value":"^(log|notification)-.*$"},{"filtertype":"age","source":"creation_date","direction":"older","unit":"days","unit_count":15}]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment