Curator for Elastic cluster with xpack


(Tushar Raut) #1

Hi,

I am trying to setup curator for my elastic cluster which is running on version 6.3.
I have installed curator 5.5.4.

Curator yaml :

---
client:
  hosts:
    - ["node-1", "node-2", "node-3"]
  port: 9200
  url_prefix:
  use_ssl: False
  certificate:
  client_cert:
  client_key:
  ssl_no_validate: False
  http_auth:
  timeout: 30
  master_only: False
  username: elastic
  password: admin

logging:
  loglevel: INFO
  logfile:
  logformat: default
  blacklist: []

While running curator with above configuration I am getting following errors:

[root@ELK-Setup-01 curator-test]# curator ./delete_indices.yaml --config curator.yaml --dry-run
No handlers could be found for logger "curator.validators.SchemaCheck"
Traceback (most recent call last):
File "/usr/bin/curator", line 11, in
sys.exit(cli())
File "/usr/lib/python2.7/site-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/curator/cli.py", line 213, in cli
run(config, action_file, dry_run)
File "/usr/lib/python2.7/site-packages/curator/cli.py", line 106, in run
client_args = process_config(config)
File "/usr/lib/python2.7/site-packages/curator/config_utils.py", line 37, in process_config
config = test_config(yaml_file)
File "/usr/lib/python2.7/site-packages/curator/config_utils.py", line 20, in test_config
'Client Configuration', 'full configuration dictionary').result()
File "/usr/lib/python2.7/site-packages/curator/validators/schemacheck.py", line 69, in result
self.test_what, self.location, self.badvalue, self.error)
curator.exceptions.ConfigurationError: Configuration: Client Configuration: Location: full configuration dictionary: Bad Value: "{'username': 'elastic', 'hosts': [['node-1', 'node-2', 'node-3']], 'timeout': 30, 'use_ssl': False, 'password': 'admin', 'master_only': False, 'port': 9200, 'ssl_no_validate': False}", extra keys not allowed @ data['client']['username']. Check configuration file.

Is curator supports elastic stack with x-pack?
Is I am missing anything?


(Aaron Mildenstein) #2

I can't tell if your YAML is properly formatted. Please encapsulate pasted console output and config files inside triple back ticks, like this:

```
PASTED DATA
```

Based on the error, I think something is misconfigured.


(Tushar Raut) #3

Thank you @theuntergeek for suggesting format.

I have edited my post.

Apart from this I have question about Is curator support for x-pack or elastic cluster?
Can you please provide the relevant article/document if any.

Thank you.


(Aaron Mildenstein) #4

This syntax is incorrect. You are mixing multiple array syntaxes. It should be one of:

hosts: ["node-1", "node-2", "node-3"]

or

hosts:
  - "node-1"
  - "node-2"
  - "node-3"

(also note that I indented 2 spaces, rather than 1 for the second example).

See the official YAML sequence documentation for more information.


(Tushar Raut) #5

From the error msg

curator.exceptions.ConfigurationError: Configuration: Client Configuration: Location: full configuration dictionary: Bad Value: "{'username': 'elastic', 'hosts': ['node-1', 'node-2', 'node-3'], 'timeout': 30, 'use_ssl': False, 'password': 'admin@123', 'master_only': False, 'port': 9200, 'ssl_no_validate': False}", extra keys not allowed @ data['client']['username']. Check configuration file.

Seems username field does not have support in curator.


(Aaron Mildenstein) #6

That's what the http_auth field is for:

http_auth: "username:password"

This is being addressed in the next release of Curator, though.


(Tushar Raut) #7

@theuntergeek, Got it.
It is working now, somehow I missed this field.

Thank you.


(system) #8

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