1 {%- from "elasticsearch/map.jinja" import server with context %}
3 ##################### Elasticsearch Configuration Example #####################
5 # This file contains an overview of various configuration settings,
6 # targeted at operations staff. Application developers should
7 # consult the guide at <http://elasticsearch.org/guide>.
9 # The installation procedure is covered at
10 # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>.
12 # Elasticsearch comes with reasonable defaults for most settings,
13 # so you can try it out without bothering with configuration.
15 # Most of the time, these defaults are just fine for running a production
16 # cluster. If you're fine-tuning your cluster, or wondering about the
17 # effect of certain configuration option, please _do ask_ on the
18 # mailing list or IRC channel [http://elasticsearch.org/community].
20 # Any element in the configuration can be replaced with environment variables
21 # by placing them in ${...} notation. For example:
23 # node.rack: ${RACK_ENV_VAR}
25 # For information on supported formats and syntax for the config file, see
26 # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup-configuration.html>
29 ################################### Cluster ###################################
31 # Cluster name identifies your cluster for auto-discovery. If you're running
32 # multiple clusters on the same network, make sure you're using unique names.
34 # cluster.name: elasticsearch
35 {%- if server.clustername is defined %}
37 cluster.name: {{ server.clustername }}
40 #################################### Node #####################################
42 # Node names are generated dynamically on startup, so you're relieved
43 # from configuring them manually. You can tie this node to a specific name:
45 # node.name: "Franz Kafka"
47 # Every node can be configured to allow or deny being eligible as the master,
48 # and to allow or deny to store the data.
50 # Allow this node to be eligible as a master node (enabled by default):
54 # Allow this node to store data (enabled by default):
58 # You can exploit these settings to design advanced cluster topologies.
60 # 1. You want this node to never become a master node, only to hold data.
61 # This will be the "workhorse" of your cluster.
66 # 2. You want this node to only serve as a master: to not store any data and
67 # to have free resources. This will be the "coordinator" of your cluster.
72 # 3. You want this node to be neither master nor data node, but
73 # to act as a "search load balancer" (fetching data from nodes,
74 # aggregating results, etc.)
79 # Use the Cluster Health API [http://localhost:9200/_cluster/health], the
80 # Node Info API [http://localhost:9200/_nodes] or GUI tools
81 # such as <http://www.elasticsearch.org/overview/marvel/>,
82 # <http://github.com/karmi/elasticsearch-paramedic>,
83 # <http://github.com/lukas-vlcek/bigdesk> and
84 # <http://mobz.github.com/elasticsearch-head> to inspect the cluster state.
86 # A node can have generic attributes associated with it, which can later be used
87 # for customized shard allocation filtering, or allocation awareness. An attribute
88 # is a simple key value pair, similar to node.key: value, here is an example:
92 # By default, multiple nodes are allowed to start from the same installation location
93 # to disable it, set the following:
94 # node.max_local_storage_nodes: 1
97 #################################### Index ####################################
99 # You can set a number of options (such as shard/replica options, mapping
100 # or analyzer definitions, translog settings, ...) for indices globally,
103 # Note, that it makes more sense to configure index settings specifically for
104 # a certain index, either when creating it or by using the index templates API.
106 # See <http://elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules.html> and
107 # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/indices-create-index.html>
108 # for more information.
110 # Set the number of shards (splits) of an index (5 by default):
112 # index.number_of_shards: 5
114 # Set the number of replicas (additional copies) of an index (1 by default):
116 # index.number_of_replicas: 1
118 # Note, that for development on a local machine, with small indices, it usually
119 # makes sense to "disable" the distributed features:
121 # index.number_of_shards: 1
122 # index.number_of_replicas: 0
124 # These settings directly affect the performance of index and search operations
125 # in your cluster. Assuming you have enough machines to hold shards and
126 # replicas, the rule of thumb is:
128 # 1. Having more *shards* enhances the _indexing_ performance and allows to
129 # _distribute_ a big index across machines.
130 # 2. Having more *replicas* enhances the _search_ performance and improves the
131 # cluster _availability_.
133 # The "number_of_shards" is a one-time setting for an index.
135 # The "number_of_replicas" can be increased or decreased anytime,
136 # by using the Index Update Settings API.
138 # Elasticsearch takes care about load balancing, relocating, gathering the
139 # results from nodes, etc. Experiment with different settings to fine-tune
142 # Use the Index Status API (<http://localhost:9200/A/_status>) to inspect
146 #################################### Paths ####################################
148 # Path to directory containing configuration (this file and logging.yml):
150 # path.conf: /path/to/conf
152 # Path to directory where to store index data allocated for this node.
154 # path.data: /path/to/data
156 # Can optionally include more than one location, causing data to be striped across
157 # the locations (a la RAID 0) on a file level, favouring locations with most free
158 # space on creation. For example:
160 # path.data: /path/to/data1,/path/to/data2
162 # Path to temporary files:
164 # path.work: /path/to/work
168 # path.logs: /path/to/logs
170 # Path to where plugins are installed:
172 # path.plugins: /path/to/plugins
175 #################################### Plugin ###################################
177 # If a plugin listed here is not installed for current node, the node will not start.
179 # plugin.mandatory: mapper-attachments,lang-groovy
182 ################################### Memory ####################################
184 # Elasticsearch performs poorly when JVM starts swapping: you should ensure that
187 # Set this property to true to lock the memory:
189 # bootstrap.mlockall: true
191 # Make sure that the ES_MIN_MEM and ES_MAX_MEM environment variables are set
192 # to the same value, and that the machine has enough memory to allocate
193 # for Elasticsearch, leaving enough memory for the operating system itself.
195 # You should also make sure that the Elasticsearch process is allowed to lock
196 # the memory, eg. by using `ulimit -l unlimited`.
199 ############################## Network And HTTP ###############################
201 # Elasticsearch, by default, binds itself to the 0.0.0.0 address, and listens
202 # on port [9200-9300] for HTTP traffic and on port [9300-9400] for node-to-node
203 # communication. (the range means that if the port is busy, it will automatically
204 # try the next port).
206 # Set the bind address specifically (IPv4 or IPv6):
209 network.bind_host: {{ server.bind.address }}
210 http.port: {{ server.bind.port }}
212 # Set the address other nodes will use to communicate with this node. If not
213 # set, it is automatically derived. It must point to an actual IP address.
215 # network.publish_host: 192.168.0.1
217 # Set both 'bind_host' and 'publish_host':
219 # network.host: 192.168.0.1
221 # Set a custom port for the node to node communication (9300 by default):
223 # transport.tcp.port: 9300
225 # Enable compression for all communication between nodes (disabled by default):
227 # transport.tcp.compress: true
229 # Set a custom port to listen for HTTP traffic:
233 # Set a custom allowed content length:
235 # http.max_content_length: 100mb
237 # Disable HTTP completely:
239 # http.enabled: false
242 ################################### Gateway ###################################
244 # The gateway allows for persisting the cluster state between full cluster
245 # restarts. Every change to the state (such as adding an index) will be stored
246 # in the gateway, and when the cluster starts up for the first time,
247 # it will read its state from the gateway.
249 # There are several types of gateway implementations. For more information, see
250 # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/modules-gateway.html>.
252 # The default gateway type is the "local" gateway (recommended):
254 # gateway.type: local
256 # Settings below control how and when to start the initial recovery process on
257 # a full cluster restart (to reuse as much local data as possible when using shared
260 # Allow recovery process after N nodes in a cluster are up:
262 # gateway.recover_after_nodes: 1
264 # Set the timeout to initiate the recovery process, once the N nodes
265 # from previous setting are up (accepts time value):
267 # gateway.recover_after_time: 5m
269 # Set how many nodes are expected in this cluster. Once these N nodes
270 # are up (and recover_after_nodes is met), begin recovery process immediately
271 # (without waiting for recover_after_time to expire):
273 # gateway.expected_nodes: 2
276 ############################# Recovery Throttling #############################
278 # These settings allow to control the process of shards allocation between
279 # nodes during initial recovery, replica allocation, rebalancing,
280 # or when adding and removing nodes.
282 # Set the number of concurrent recoveries happening on a node:
284 # 1. During the initial recovery
286 # cluster.routing.allocation.node_initial_primaries_recoveries: 4
288 # 2. During adding/removing nodes, rebalancing, etc
290 # cluster.routing.allocation.node_concurrent_recoveries: 2
292 # Set to throttle throughput when recovering (eg. 100mb, by default 20mb):
294 # indices.recovery.max_bytes_per_sec: 20mb
296 # Set to limit the number of open concurrent streams when
297 # recovering a shard from a peer:
299 # indices.recovery.concurrent_streams: 5
302 ################################## Discovery ##################################
304 # Discovery infrastructure ensures nodes can be found within a cluster
305 # and master node is elected. Multicast discovery is the default.
307 # Set to ensure a node sees N other master eligible nodes to be considered
308 # operational within the cluster. Its recommended to set it to a higher value
309 # than 1 when running more than 2 nodes in the cluster.
311 # discovery.zen.minimum_master_nodes: 1
313 # Set the time to wait for ping responses from other nodes when discovering.
314 # Set this option to a higher value on a slow or congested network
315 # to minimize discovery failures:
317 # discovery.zen.ping.timeout: 3s
319 # For more information, see
320 # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-zen.html>
322 # Unicast discovery allows to explicitly control which nodes will be used
323 # to discover the cluster. It can be used when multicast is not present,
324 # or to restrict the cluster communication-wise.
326 # 1. Disable multicast discovery (enabled by default):
328 # discovery.zen.ping.multicast.enabled: false
330 # 2. Configure an initial list of master nodes in the cluster
331 # to perform discovery when new nodes (master or data) are started:
333 # discovery.zen.ping.unicast.hosts: ["host1", "host2:port"]
335 # EC2 discovery allows to use AWS EC2 API in order to perform discovery.
337 # You have to install the cloud-aws plugin for enabling the EC2 discovery.
339 # For more information, see
340 # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-ec2.html>
342 # See <http://elasticsearch.org/tutorials/elasticsearch-on-ec2/>
343 # for a step-by-step tutorial.
345 # GCE discovery allows to use Google Compute Engine API in order to perform discovery.
347 # You have to install the cloud-gce plugin for enabling the GCE discovery.
349 # For more information, see <https://github.com/elasticsearch/elasticsearch-cloud-gce>.
351 # Azure discovery allows to use Azure API in order to perform discovery.
353 # You have to install the cloud-azure plugin for enabling the Azure discovery.
355 # For more information, see <https://github.com/elasticsearch/elasticsearch-cloud-azure>.
357 ################################## Slow Log ##################################
359 # Shard level query and fetch threshold logging.
361 #index.search.slowlog.threshold.query.warn: 10s
362 #index.search.slowlog.threshold.query.info: 5s
363 #index.search.slowlog.threshold.query.debug: 2s
364 #index.search.slowlog.threshold.query.trace: 500ms
366 #index.search.slowlog.threshold.fetch.warn: 1s
367 #index.search.slowlog.threshold.fetch.info: 800ms
368 #index.search.slowlog.threshold.fetch.debug: 500ms
369 #index.search.slowlog.threshold.fetch.trace: 200ms
371 #index.indexing.slowlog.threshold.index.warn: 10s
372 #index.indexing.slowlog.threshold.index.info: 5s
373 #index.indexing.slowlog.threshold.index.debug: 2s
374 #index.indexing.slowlog.threshold.index.trace: 500ms
376 ################################## GC Logging ################################
378 #monitor.jvm.gc.young.warn: 1000ms
379 #monitor.jvm.gc.young.info: 700ms
380 #monitor.jvm.gc.young.debug: 400ms
382 #monitor.jvm.gc.old.warn: 10s
383 #monitor.jvm.gc.old.info: 5s
384 #monitor.jvm.gc.old.debug: 2s