Further elasticsearch config tweaks.
* modules/logstash/files/elasticsearch.yml: Set the number of elasticsearch shards to 1 and the number of replicas to 0 as we are not running a cluster, just a single node. * modules/openstack_project/manifests/logstash.pp: Update elasticsearch indice optimization cron job's max_num_segments value from 1 to 2. These options are suggested at https://github.com/logstash/logstash/wiki/Elasticsearch-Storage-Optimization Change-Id: I747ab8952f0102ba582e213407909aaeebcf2778 Reviewed-on: https://review.openstack.org/28616 Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Khai Do <zaro0508@gmail.com> Approved: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
This commit is contained in:
parent
964dbc45be
commit
868ad1ff0f
@ -114,6 +114,12 @@
|
||||
# index.number_of_shards: 1
|
||||
# index.number_of_replicas: 0
|
||||
|
||||
# Set number of shards to 1 and replicas to 0 as we are not running an elastic
|
||||
# search cluster and https://github.com/logstash/logstash/wiki/Elasticsearch-Storage-Optimization
|
||||
# recommends this configuration.
|
||||
index.number_of_shards: 1
|
||||
index.number_of_replicas: 0
|
||||
|
||||
# These settings directly affect the performance of index and search operations
|
||||
# in your cluster. Assuming you have enough machines to hold shards and
|
||||
# replicas, the rule of thumb is:
|
||||
|
@ -94,7 +94,7 @@ class openstack_project::logstash (
|
||||
user => 'root',
|
||||
hour => '5',
|
||||
minute => '0',
|
||||
command => 'curl -sS -XPOST "http://localhost:9200/logstash-`date -d yesterday +\%Y.\%m.\%d`/_optimize" -d \'max_num_segments=1\'',
|
||||
command => 'curl -sS -XPOST "http://localhost:9200/logstash-`date -d yesterday +\%Y.\%m.\%d`/_optimize?max_num_segments=2"',
|
||||
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user