# Curator for elasticsearch 6.7 not working

**URL:** <https://discuss.elastic.co/t/curator-for-elasticsearch-6-7-not-working/175527>\
**Category:** Elasticsearch\
**Tags:** curator\
**Created:** [April 5, 2019, 6:54am UTC](https://discuss.elastic.co/t/curator-for-elasticsearch-6-7-not-working/175527 "2019-04-05T06:54:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkain](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@mkain](https://discuss.elastic.co/u/mkain)\
**Post date:** [April 5, 2019, 6:54am UTC](https://discuss.elastic.co/t/curator-for-elasticsearch-6-7-not-working/175527/1 "2019-04-05T06:54:00Z")

</div>

Hi,

I am using my previous action.yml and config.yml of curator to delete old indices of elasticsearch. I have installed python 3.7.2 and curator 5.6.

My config is:

```
cat config.yml
client:
  hosts:
    - 127.0.0.1
  port: 9200
  url_prefix:
  use_ssl: False
  certificate:
  client_cert:
  client_key:
  ssl_no_validate: False
  http_auth:
  timeout: 30
  master_only: False

logging:
  loglevel: INFO
  logfile:
  logformat: default
  blacklist: ['elasticsearch', 'urllib3']

```

And my action.yml is:

```
cat action.yml
actions:
  1:
    action: delete_indices
    description: >-
      Delete indices older than 90 days (based on index name), for logstash-
      prefixed indices. Ignore the error if the filter does not result in an
      actionable list of indices (ignore_empty_list) and exit cleanly.
    options:
      ignore_empty_list: True
      timeout_override:
      continue_if_exception: False
      disable_action: True
    filters:
    - filtertype: pattern
      kind: prefix
      value: logstash-
      exclude:
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 90
exclude:

```

When I do dry run:

`/opt/python3/bin/curator --config /opt/elk/curator/config.yml --dry-run /opt/elk/curator/action.yml`

I get following error:

```
/opt/python3/lib/python3.7/site-packages/curator/utils.py:53: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  return yaml.load(read_file(path))
2019-04-05 07:52:44,389 ERROR Schema error: extra keys not allowed @ data['exclude']
Traceback (most recent call last):
  File "/opt/python3/lib/python3.7/site-packages/curator/validators/schemacheck.py", line 57, in result
    return self.schema(self.config)
  File "/opt/python3/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 267, in __call__
    return self._compiled([], data)
  File "/opt/python3/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 589, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/opt/python3/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 427, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['exclude']

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/python3/bin/curator", line 11, in <module>
    sys.exit(cli())
  File "/opt/python3/lib/python3.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/opt/python3/lib/python3.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/opt/python3/lib/python3.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/python3/lib/python3.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/opt/python3/lib/python3.7/site-packages/curator/cli.py", line 213, in cli
    run(config, action_file, dry_run)
  File "/opt/python3/lib/python3.7/site-packages/curator/cli.py", line 119, in run
    action_dict = validate_actions(action_config)
  File "/opt/python3/lib/python3.7/site-packages/curator/utils.py", line 1399, in validate_actions
    root = SchemaCheck(data, actions.root(), 'Actions File', 'root').result()
  File "/opt/python3/lib/python3.7/site-packages/curator/validators/schemacheck.py", line 69, in result
    self.test_what, self.location, self.badvalue, self.error)
curator.exceptions.ConfigurationError: Configuration: Actions File: Location: root: Bad Value: "None", extra keys not allowed @ data['exclude']. Check configuration file.

```

Can someone please guide me to resolve it ?

Regards,  
-Manish

---

<div class="post-metadata">

**Author:** ![harshbajaj16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshbajaj16/32/44970_2.png) [@harshbajaj16](https://discuss.elastic.co/u/harshbajaj16)\
**Post date:** [April 5, 2019, 10:32am UTC](https://discuss.elastic.co/t/curator-for-elasticsearch-6-7-not-working/175527/2 "2019-04-05T10:32:23Z")

</div>

Hi @mkain

For below error please remove extra key i.e. **exclude:** at the end of in your action.yml file and try it.

> [@](#):
>
> voluptuous.error.MultipleInvalid: extra keys not allowed @ data['exclude']

if you are still getting another exception please let me know.

Br,  
Harsh Bajaj

---

<div class="post-metadata">

**Author:** ![mkain](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@mkain](https://discuss.elastic.co/u/mkain)\
**Post date:** [April 8, 2019, 9:04am UTC](https://discuss.elastic.co/t/curator-for-elasticsearch-6-7-not-working/175527/3 "2019-04-08T09:04:51Z")

</div>

Yes, this worked. final action.yml is

```
actions:
  1:
    action: delete_indices
    description: >-
      Delete indices older than 90 days (based on index name), for logstash-
      prefixed indices. Ignore the error if the filter does not result in an
      actionable list of indices (ignore_empty_list) and exit cleanly.
    options:
      ignore_empty_list: True
      timeout_override:
      continue_if_exception: False
      disable_action: True
    filters:
    - filtertype: pattern
      kind: prefix
      value: logstash-
      exclude:
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 90
```

---

<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:** [May 6, 2019, 9:17am UTC](https://discuss.elastic.co/t/curator-for-elasticsearch-6-7-not-working/175527/4 "2019-05-06T09:17:23Z")

</div>

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