Graylog2 / graylog-ansible-role

Ansible role which installs and configures Graylog
Apache License 2.0
212 stars 127 forks source link

Bug: Elasticsearch config in README is invalid #48

Closed midN closed 7 years ago

midN commented 7 years ago

Provided variables in README coming from ES role/playbook are invalid.

These variables are used by Elasticsearch role to build elasticsearch.yml file, however Graylog playbook creates its own file in its own defined directory, why is that?

As a result i cannot change es_heap_size or anything the way it's provided in README as it will not be put in main config created by Graylog playbook. Also there are now 2 elasticsearch.yml configs created, one by Graylog in /etc/graylog/server/elasticsearch.yml and one in /etc/elasticsearch/<NODENAME>/elasticsearch.yml.

So basically This Task is quite useless and confusing.

In order to make it work properly i had to:

  1. Change graylog_elasticsearch_config_file to path used by Elasticsearch playbook.
  2. Then it turns out that is not enough as well due to permissions, so had to set es_user and es_group to graylog in order to have graylog access elasticsearch config.

I propose adding graylog_elasticsearch_config_file, es_group and es_user to README with explanation on how to use them, as well as removing or changing. Otherwise it's impossible to understand/conf it properly due to README in examples having ES config options that in will not be used in the end-result with same README example.

joschi commented 7 years ago

@midN Graylog runs an embedded Elasticsearch client node for which the file in /etc/graylog/server/elasticsearch.yml is being used.

The configuration file in /etc/elasticsearch/elasticsearch.yml is being used by the standalone Elasticsearch node which also stores data (in contrast to the embedded ES node in Graylog which doesn't store any data).