6ebca3d78f
When running a multi-node ELK stack (5+ nodes) the elasticsearch server needs to be able to mark and identify nodes that will be data and master nodes. This change ensures that the first set of available master nodes is mark accordingly as both data and master and that all other nodes are marked as cluster members with alternating nodes being marked as data nodes. With this change the cluster will be able to grow as well as handle large data sets more efficiently. This change ensures that sharding is correctly started when the cluster is deployed and that the beat services are using the recommended sharding practices. Change-Id: Id555132199f268b21aaa939a84760c744238dd2b Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
19 lines
814 B
Django/Jinja
19 lines
814 B
Django/Jinja
{% set shards = ((groups["elastic-logstash"] | length) * 3) | int %}
|
|
|
|
# Elasticsearch template settings
|
|
setup.template.settings:
|
|
|
|
# A dictionary of settings to place into the settings.index dictionary
|
|
# of the Elasticsearch template. For more details, please check
|
|
# https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html
|
|
index:
|
|
number_of_shards: {{ shards }}
|
|
codec: best_compression
|
|
# This provides for an index split of up to 2 times the number of available shards
|
|
number_of_routing_shards: {{ (shards | int) * 2 * (groups["elastic-logstash"] | length) }}
|
|
|
|
# A dictionary of settings for the _source field. For more details, please check
|
|
# https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-source-field.html
|
|
#_source:
|
|
#enabled: false
|