# Rollover and deleting indices using curator

**URL:** <https://discuss.elastic.co/t/rollover-and-deleting-indices-using-curator/111393>\
**Category:** Elasticsearch\
**Created:** [December 12, 2017, 5:26pm UTC](https://discuss.elastic.co/t/rollover-and-deleting-indices-using-curator/111393 "2017-12-12T17:26:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kunam](https://avatars.discourse-cdn.com/v4/letter/k/3d9bf3/32.png) [@kunam](https://discuss.elastic.co/u/kunam)\
**Post date:** [December 12, 2017, 5:26pm UTC](https://discuss.elastic.co/t/rollover-and-deleting-indices-using-curator/111393/1 "2017-12-12T17:26:02Z")

</div>

Hi,  
I want to rollover and delete indices which are older than 15days using curator 5.4.1

created two configuration files  
cat curator.yml  
client:  
hosts:  
- xxxxxxxxxxxxx  
port: 9243  
url\_prefix:  
use\_ssl: true  
certificate:  
client\_cert:  
client\_key:  
ssl\_no\_validate: False  
http\_auth: 'xxxxx:xxxx'  
timeout: 30  
master\_only: False

logging:  
loglevel: INFO  
logfile: /var/log/curator/curator.log  
logformat: default  
blacklist: ['elasticsearch', 'urllib3']

cat curator.yml

1:  
action: rollover  
description: Rollover the index "my\_alias" when it is older than 15 days  
options:  
name: my\_alias

# max\_docs: 2000000

max\_age: 15d  
disable\_action: False  
2:  
action: delete\_indices  
description: \>-  
Delete indices older than 15 days (based on index name),for logstas  
h-prefixed indices. Ignore the error if the filter does not result  
in an actionable list of indices (ignore\_empty\_list) and exit clean  
ly.  
options:  
ignore\_empty\_list: True  
disable\_action: False  
filters:

- filtertype: pattern  
kind: prefix  
value: logstash-,manageiq-,proofpoint-,azure-,  
iis-,adallom-,
- filtertype: age  
source: name  
direction: older  
timestring: '%Y.%m.%d'  
unit: days  
unit\_count: 15

I have executed this command below

/usr/bin# curator --dry-run --config /home/munna/.curator/curator.yml /home/munna/.curator/rollover.yml

the execution of the following command is as follows, throwing me these errrors

Traceback (most recent call last):  
File "/usr/local/bin/curator", line 11, in   
load\_entry\_point('elasticsearch-curator==5.4.1', 'console\_scripts', 'curator')()  
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in **call**  
return self.main(\*args, \*\*kwargs)  
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main  
rv = self.invoke(ctx)  
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke  
return ctx.invoke(self.callback, \*\*ctx.params)  
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke  
return callback(\*args, \*\*kwargs)  
File "/usr/local/lib/python2.7/dist-packages/curator/cli.py", line 211, in cli  
run(config, action\_file, dry\_run)  
File "/usr/local/lib/python2.7/dist-packages/curator/cli.py", line 117, in run  
action\_config = get\_yaml(action\_file)  
File "/usr/local/lib/python2.7/dist-packages/curator/utils.py", line 56, in get\_yaml  
'Unable to parse YAML file. Error: {0}'.format(e))  
curator.exceptions.ConfigurationError: **Unable to parse YAML file. Error: mapping values are not allowed here**  
in "", line 29, column 10:  
kind: prefix  
^  
kindly help me this configuration, if wrong kindly please help me in correction of this configuration files.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [December 12, 2017, 8:50pm UTC](https://discuss.elastic.co/t/rollover-and-deleting-indices-using-curator/111393/2 "2017-12-12T20:50:13Z")

</div>

You must properly encapsulate your pasted YAML file within triple back ticks, or I cannot tell if the formatting (indentation, etc.) is correct. The error you pasted indicates a YAML configuration file error, but I cannot tell where it is because of the formatting.

````
```
PASTED CONTENT HERE
```
````

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 9, 2018, 8:50pm UTC](https://discuss.elastic.co/t/rollover-and-deleting-indices-using-curator/111393/3 "2018-01-09T20:50:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
