Hi ,
I'm using curator to delete my index by time basic, but in my index name doesn't contain timestring.
How could i perform this delete operation.
ACTION.YMl
---
# Remember, leave a key empty if there is no value. None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True. If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
1:
action: delete_indices
description: delete
options:
ignore_empty_list: True
disable_action: false
continue_if_exception : True
filters:
#- filtertype:kibana
# exclude:False
- filtertype: age
source: field_stats
field: 'log_timestamp'
direction: older
unit: days
unit_count: 90
When i run the above file i'm getting following error. Its searching different index and throwing error.
2017-06-22 23:00:59,742 INFO Preparing Action ID: 1, "delete_indices"
2017-06-22 23:00:59,750 INFO Trying Action ID: 1, "delete_indices": delete
2017-06-22 23:00:59,769 ERROR Failed to complete action: delete_indices. <class 'curator.exceptions.ActionError'>: Field "zephyr_timestamp" not found in index "logstash-dd.dcs_owner_log"
Please help me to be specific exact index name to perform delete option.
i have indexed value for 3 months like jan,feb,mar. I want to delete the entire feb month index value from index. How could i perform that using curator.
Okay, I'm a bit confused. The configuration you shared has:
source: field_stats
field: 'log_timestamp'
But the error message indicates a field called zephyr_timestamp. The bottom line is that when using source: field_stats, whatever you select for fieldmust be in all of the indices being acted on. If that field is not found in even one of the indices to be acted on, an exception like the one you shared will happen.
If the values for all three months are all in one index, then you cannot use Curator to delete them. Curator does not delete selective data from indices. It can only delete entire indices.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.