blob: 1d85c546dd457be283f271f0681801f8524ca431 [file] [log] [blame]
Filip Pytloun5163dfb2015-10-06 16:28:31 +02001
2=============
Ales Komarekdd881a62015-12-08 11:03:49 +01003Elasticsearch
Filip Pytloun5163dfb2015-10-06 16:28:31 +02004=============
5
Ales Komarekdd881a62015-12-08 11:03:49 +01006Elasticsearch provides a distributed, multitenant-capable full-text search engine with a HTTP web interface and schema-free JSON documents.
7
Filip Pytloun5163dfb2015-10-06 16:28:31 +02008Sample pillars
9==============
10
Filip Pytloun63c8c252016-05-05 16:14:02 +020011Single-node elasticsearch with clustering disabled:
12
Filip Pytloun5163dfb2015-10-06 16:28:31 +020013.. code-block:: yaml
14
15 elasticsearch:
16 server:
17 enabled: true
Filip Pytloun5163dfb2015-10-06 16:28:31 +020018 bind:
19 address: 0.0.0.0
20 port: 9200
Filip Pytloun63c8c252016-05-05 16:14:02 +020021 cluster:
22 multicast: false
23 index:
24 shards: 1
25 replicas: 0
26
27Cluster with manually defined members:
28
29.. code-block:: yaml
30
31 elasticsearch:
32 server:
33 enabled: true
34 bind:
35 address: 0.0.0.0
36 port: 9200
37 cluster:
38 multicast: false
39 members:
40 - host: elastic01
41 port: 9300
42 - host: elastic02
43 port: 9300
44 - host: elastic03
45 port: 9300
46 index:
47 shards: 5
48 replicas: 1
Filip Pytloun5163dfb2015-10-06 16:28:31 +020049
Filip Pytloun911588c2016-06-29 16:27:53 +020050Common definition for curator:
51
52.. code-block:: yaml
53
54 elasticsearch:
55 server:
56 curator:
57 timeout: 900
58 logfile: /var/log/elasticsearch/curator.log
59 logformat: json
60 actions:
61 - action: delete_indices
62 description: >-
63 Delete indices older than 45 days (based on index name).
64 Ignore the error if the filter does not result in an actionable
65 list of indices (ignore_empty_list) and exit cleanly.
66 options:
67 ignore_empty_list: True
68 continue_if_exception: False
69 disable_action: False
70 filters:
71 - filtertype: pattern
72 kind: regex
73 value: '.*\-\d\d\d\d\.\d\d\.\d\d$'
74 - filtertype: age
75 source: name
76 direction: older
77 timestring: '%Y.%m.%d'
78 unit: days
79 unit_count: 90
80 - action: replicas
81 description: >-
82 Reduce the replica count to 0 for indices older than 30 days
83 (based on index creation_date)
84 options:
85 count: 0
86 wait_for_completion: False
87 continue_if_exception: False
88 disable_action: False
89 filters:
90 - filtertype: pattern
91 kind: regex
92 value: '.*\-\d\d\d\d\.\d\d\.\d\d$'
93 - filtertype: age
94 source: creation_date
95 direction: older
96 unit: days
97 unit_count: 30
98 - action: forcemerge
99 description: >-
100 forceMerge indices older than 2 days (based on index
101 creation_date) to 2 segments per shard. Delay 120 seconds
102 between each forceMerge operation to allow the cluster to
103 quiesce.
104 This action will ignore indices already forceMerged to the same
105 or fewer number of segments per shard, so the 'forcemerged'
106 filter is unneeded.
107 options:
108 max_num_segments: 2
109 delay: 120
110 continue_if_exception: False
111 disable_action: True
112 filters:
113 - filtertype: pattern
114 kind: regex
115 value: '.*\-\d\d\d\d\.\d\d\.\d\d$'
116 - filtertype: age
117 source: creation_date
118 direction: older
119 unit: days
120 unit_count: 2
121
Guillaume Thouvenind39b3522016-11-17 10:49:58 +0100122Client setup
123------------
124
125Client with host and port
126
127.. code-block:: yaml
128
129 elasticsearch:
130 client:
131 enabled: true
132 server:
133 host: elasticsearch.host
134 port: 9200
135
Filip Pytloun5163dfb2015-10-06 16:28:31 +0200136Read more
137=========
138
Ales Komarekdd881a62015-12-08 11:03:49 +0100139
140* https://www.elastic.co/
Filip Pytloun5163dfb2015-10-06 16:28:31 +0200141* http://alex.nederlof.com/blog/2012/11/19/installing-elasticsearch-with-jenkins-on-ubuntu/
142* http://websightdesigns.com/wiki/Setting_up_Centralized_Event_Parsing_on_Ubuntu_12.04
143* https://gist.github.com/wingdspur/2026107