# Unable to use curator 5.2.0 with ELK 5.6.2

**URL:** https://discuss.elastic.co/t/unable-to-use-curator-5-2-0-with-elk-5-6-2/104873
**Category:** Elasticsearch
**Created:** [October 23, 2017, 9:04am UTC](https://discuss.elastic.co/t/unable-to-use-curator-5-2-0-with-elk-5-6-2/104873 "2017-10-23T09:04:04Z")
**Posts on this page:** 11
**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: [October 23, 2017, 9:04am UTC](https://discuss.elastic.co/t/unable-to-use-curator-5-2-0-with-elk-5-6-2/104873/1 "2017-10-23T09:04:04Z")

</div>

Hi,

I have ELK 5.6.0 installed and I want to delete data older than 10 days. I have installed curator using pip and it got ver 5.2.0 of it by default.

When I execute curator I get following error

[root@elk0 elasticsearch-curator]# /usr/bin/curator –config /elk/sw/elasticsearch-curator/config.yml –dry-run /elk/sw/elasticsearch-curator/action.yml  
Traceback (most recent call last):  
File "/usr/bin/curator", line 5, in   
from pkg\_resources import load\_entry\_point  
File "/usr/lib/python2.6/site-packages/pkg\_resources.py", line 2655, in   
working\_set.require( **requires** )  
File "/usr/lib/python2.6/site-packages/pkg\_resources.py", line 648, in require  
needed = self.resolve(parse\_requirements(requirements))  
File "/usr/lib/python2.6/site-packages/pkg\_resources.py", line 546, in resolve  
raise DistributionNotFound(req)  
pkg\_resources.DistributionNotFound: certifi\>=2017.4.17

I am on RHEL 9 and I do have certifi (2017.7.27.1) installed.

pls help

Regards,  
-Manish

---

<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: [October 23, 2017, 9:49am UTC](https://discuss.elastic.co/t/unable-to-use-curator-5-2-0-with-elk-5-6-2/104873/2 "2017-10-23T09:49:24Z")

</div>

I presume you installed via `pip`, as this appears to be using the system version of Python 2.6. Python 2.6 is not officially supported by Curator anymore, as it is fully deprecated/not supported by the Python organization anymore.

Is there a reason you chose not to install from the [YUM repository](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.2/yum-repository.html)? This version is self-contained with all the necessary Python 3.6 modules and system libraries, and should work independently of the built-in Python on RHEL/CentOS systems.

---

<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: [October 23, 2017, 10:24am UTC](https://discuss.elastic.co/t/unable-to-use-curator-5-2-0-with-elk-5-6-2/104873/3 "2017-10-23T10:24:48Z")

</div>

Hi Aaron, I had first installed it using YUM repo but upon executing curator I got GLIBC errors. then I tried pip installation.

Regards,  
-Manish

---

<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: [October 23, 2017, 11:21am UTC](https://discuss.elastic.co/t/unable-to-use-curator-5-2-0-with-elk-5-6-2/104873/4 "2017-10-23T11:21:59Z")

</div>

Hi,

```
I have now installed python 3 from source and have installed curator with pip3.

```

Now I am not getting any system error but I see usage error. I am able to use same arguments in curator 5.1.1 but it 5.2 it gives error

```auto
[root@elk0 curator]# /elk/sw/python3.6.3/bin/curator –-config /elk/sw/elasticsearch-curator/config.yml --dry-run /elk/sw/elasticsearch-curator/action.yml
Usage: curator [OPTIONS] ACTION_FILE

Error: Invalid value for "action_file": Path "–-config" does not exist.

```

Regards,  
-Manish

---

<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: [October 23, 2017, 11:41am UTC](https://discuss.elastic.co/t/unable-to-use-curator-5-2-0-with-elk-5-6-2/104873/5 "2017-10-23T11:41:10Z")

</div>

Try putting `--dry-run` before `--config`

---

<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: [October 23, 2017, 3:18pm UTC](https://discuss.elastic.co/t/unable-to-use-curator-5-2-0-with-elk-5-6-2/104873/6 "2017-10-23T15:18:55Z")

</div>

Also, looking closer, and editing your pasted response to be encapsulated in triple back-ticks, your version doesn't say `--config`, but rather `–-config`. I'm not sure what character that first dash is, but it is not the regular `-`, and that's why it's being misinterpreted. The dashes are clearly correct for your `--dry-run` flag, though.

---

<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: [October 24, 2017, 3:05am UTC](https://discuss.elastic.co/t/unable-to-use-curator-5-2-0-with-elk-5-6-2/104873/7 "2017-10-24T03:05:59Z")

</div>

Hi Aaron,

```
You were correct, when I tried using --dry-run before --config it took the cmd. But now I am getting different error.

```

my config.yml (curator config) is:

_client:_  
_hosts:_  
_- 127.0.0.1_  
_port: 9200_  
_logging:_  
_loglevel: INFO_  
_logfile: "/var/log/curator/actions.log"_  
_logformat: default_  
_blacklist: ['elasticsearch', 'urllib3']_

And my action.yml is:

_actions:_  
_1:_  
_action: delete\_indices_  
_description: \>-_  
_Delete indices older than 10 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: False_  
_filters:_  
_- filtertype: pattern_  
_kind: prefix_  
_value: logstash-_  
_exclude:_  
_- filtertype: age_  
_source: name_  
_direction: older_  
_timestring: '%Y.%m.%d'_  
_unit: days_  
_unit\_count: 10_  
_exclude:_

When I execute curator I get following error.

[root@elk0 bin]# /elk/sw/python3.6.3/bin/curator --dry-run --config /elk/sw/elasticsearch-curator/config.yml /elk/sw/elasticsearch-curator/action.yml

_Schema error: extra keys not allowed @ data['hosts']_  
_Traceback (most recent call last):_  
\_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/curator/validators/schemacheck.py", line 57, in result\_  
\_ return self.schema(self.config)\_  
\_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/voluptuous/schema\_builder.py", line 221, in **call** \_  
\_ return self._compiled([], data)_  
\_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/voluptuous/schema\_builder.py", line 538, in validate\_dict\_  
\_ return base\_validate(path, iteritems(data), out)\_  
\_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/voluptuous/schema\_builder.py", line 370, in validate\_mapping\_  
\_ raise er.MultipleInvalid(errors)\_  
_voluptuous.error.MultipleInvalid: extra keys not allowed @ data['hosts']_

_During handling of the above exception, another exception occurred:_

_Traceback (most recent call last):_  
\_ File "/elk/sw/python3.6.3/bin/curator", line 11, in \_  
\_ load\_entry\_point('elasticsearch-curator==5.2.0', 'console\_scripts', 'curator')()\_  
\_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/click/core.py", line 722, in **call** \_  
\_ return self.main(\*args, \*\*kwargs)\_  
\_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/click/core.py", line 697, in main\_  
\_ rv = self.invoke(ctx)\_  
\_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/click/core.py", line 895, in invoke\_  
\_ return ctx.invoke(self.callback, \*\*ctx.params)\_  
\_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/click/core.py", line 535, in invoke\_  
\_ return callback(\*args, \*\*kwargs)\_  
\_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/curator/cli.py", line 211, in cli\_  
\_ run(config, action\_file, dry\_run)\_  
\_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/curator/cli.py", line 106, in run\_  
\_ client\_args = process\_config(config)\_  
\_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/curator/config\_utils.py", line 45, in process\_config\_  
\_ config = test\_config(yaml\_file)\_  
\_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/curator/config\_utils.py", line 19, in test\_config\_  
\_ 'Client Configuration', 'full configuration dictionary').result()\_  
\_ File "/elk/sw/python3.6.3/lib/python3.6/site-packages/curator/validators/schemacheck.py", line 68, in result\_  
\_ self.test\_what, self.location, self.badvalue, self.error)\_  
_curator.exceptions.ConfigurationError: Configuration: Client Configuration: Location: full configuration dictionary: Bad Value: "['127.0.0.1']", extra keys not allowed @ data['hosts']. Check configuration file._

Any idea how to fix this ? same action and config works well in curator 5.1.1

Regards,  
-Manish

---

<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: [October 24, 2017, 8:33am UTC](https://discuss.elastic.co/t/unable-to-use-curator-5-2-0-with-elk-5-6-2/104873/8 "2017-10-24T08:33:37Z")

</div>

> [@mkain](#):
>
> Schema error: extra keys not allowed @ data['hosts']

This indicates something was not properly indented. YAML requires proper indentation. You need to paste your output and configuration inside code tags, or triple back-ticks:

````
```
Pasted text
```

````

This will format the text as a mono space font, like in a console. It shows indentation properly.

---

<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: [October 30, 2017, 7:32am UTC](https://discuss.elastic.co/t/unable-to-use-curator-5-2-0-with-elk-5-6-2/104873/9 "2017-10-30T07:32:37Z")

</div>

```
**Corrected action.yml** 

[root@elk0 marya]# cat /elk/sw/elasticsearch-curator/action.yml
---
actions:
  1:
    action: delete_indices
    description: >-
      Delete indices older than 10 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: False
    filters:
    - filtertype: pattern
      kind: prefix
      value: logstash-
      exclude:
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 90
      exclude:

**Config.yml**

[root@elk0 marya]# cat /elk/sw/elasticsearch-curator/config.yml
---
client:
  hosts:
   - 127.0.0.1
  port: 9200
logging:
  loglevel: INFO
  logfile: "/var/log/curator/actions.log"
  logformat: default
  blacklist: ['elasticsearch', 'urllib3']
```

---

<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: [October 30, 2017, 12:03pm UTC](https://discuss.elastic.co/t/unable-to-use-curator-5-2-0-with-elk-5-6-2/104873/10 "2017-10-30T12:03:58Z")

</div>

> [@mkain](#):
>
> ```auto
> ---
> client:
> hosts:
> - 127.0.0.1
> 
> ```

This should probably be a single line, unless you plan on adding more hosts in the future:

```auto
---
client:
  hosts: 127.0.0.1

```

or

```auto
---
client:
  hosts: [127.0.0.1]

```

---

<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: [November 27, 2017, 12:04pm UTC](https://discuss.elastic.co/t/unable-to-use-curator-5-2-0-with-elk-5-6-2/104873/11 "2017-11-27T12:04:00Z")

</div>

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