blob: 8c49531d844ae162f0d315abcfca93aa1de463e5 [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
Filip Pytloundf5209c2016-09-23 11:55:56 +020027Setup shared repository for snapshots:
28
29.. code-block:: bash
30
31 elasticsearch:
32 server:
33 snapshot:
34 reponame:
35 path: /var/lib/glusterfs/repo
36 compress: true
37
Filip Pytloun63c8c252016-05-05 16:14:02 +020038Cluster with manually defined members:
39
40.. code-block:: yaml
41
42 elasticsearch:
43 server:
44 enabled: true
45 bind:
46 address: 0.0.0.0
47 port: 9200
48 cluster:
49 multicast: false
50 members:
51 - host: elastic01
52 port: 9300
53 - host: elastic02
54 port: 9300
55 - host: elastic03
56 port: 9300
57 index:
58 shards: 5
59 replicas: 1
Filip Pytloun5163dfb2015-10-06 16:28:31 +020060
Filip Pytloun911588c2016-06-29 16:27:53 +020061Common definition for curator:
62
63.. code-block:: yaml
64
65 elasticsearch:
66 server:
67 curator:
68 timeout: 900
69 logfile: /var/log/elasticsearch/curator.log
70 logformat: json
71 actions:
72 - action: delete_indices
73 description: >-
74 Delete indices older than 45 days (based on index name).
75 Ignore the error if the filter does not result in an actionable
76 list of indices (ignore_empty_list) and exit cleanly.
77 options:
78 ignore_empty_list: True
79 continue_if_exception: False
80 disable_action: False
81 filters:
82 - filtertype: pattern
83 kind: regex
84 value: '.*\-\d\d\d\d\.\d\d\.\d\d$'
85 - filtertype: age
86 source: name
87 direction: older
88 timestring: '%Y.%m.%d'
89 unit: days
90 unit_count: 90
91 - action: replicas
92 description: >-
93 Reduce the replica count to 0 for indices older than 30 days
94 (based on index creation_date)
95 options:
96 count: 0
97 wait_for_completion: False
98 continue_if_exception: False
99 disable_action: False
100 filters:
101 - filtertype: pattern
102 kind: regex
103 value: '.*\-\d\d\d\d\.\d\d\.\d\d$'
104 - filtertype: age
105 source: creation_date
106 direction: older
107 unit: days
108 unit_count: 30
109 - action: forcemerge
110 description: >-
111 forceMerge indices older than 2 days (based on index
112 creation_date) to 2 segments per shard. Delay 120 seconds
113 between each forceMerge operation to allow the cluster to
114 quiesce.
115 This action will ignore indices already forceMerged to the same
116 or fewer number of segments per shard, so the 'forcemerged'
117 filter is unneeded.
118 options:
119 max_num_segments: 2
120 delay: 120
121 continue_if_exception: False
122 disable_action: True
123 filters:
124 - filtertype: pattern
125 kind: regex
126 value: '.*\-\d\d\d\d\.\d\d\.\d\d$'
127 - filtertype: age
128 source: creation_date
129 direction: older
130 unit: days
131 unit_count: 2
132
Filip Pytloun5163dfb2015-10-06 16:28:31 +0200133Read more
134=========
135
Ales Komarekdd881a62015-12-08 11:03:49 +0100136
137* https://www.elastic.co/
Filip Pytloun5163dfb2015-10-06 16:28:31 +0200138* http://alex.nederlof.com/blog/2012/11/19/installing-elasticsearch-with-jenkins-on-ubuntu/
139* http://websightdesigns.com/wiki/Setting_up_Centralized_Event_Parsing_on_Ubuntu_12.04
140* https://gist.github.com/wingdspur/2026107