From e1e9271b210458bb42017c177084afdd2ea4da8c Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 16 Jul 2013 22:34:09 -0700 Subject: [PATCH] Optimize ElasticSearch indices later. * modules/openstack_project/manifests/elasticsearch.pp: Run the index optimize cron 8 hours later to avoid optimizing an index that is still in use. Doing this as during periods of high test load (eg around milestones) logstash may not be able to index all of the previous day's logs prior to 0500 of the next day. Change-Id: Ic00413bea6863e0fc945b5507be7b4a2aaaea3af --- modules/openstack_project/manifests/elasticsearch.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openstack_project/manifests/elasticsearch.pp b/modules/openstack_project/manifests/elasticsearch.pp index bd502654cf..f2d4d43162 100644 --- a/modules/openstack_project/manifests/elasticsearch.pp +++ b/modules/openstack_project/manifests/elasticsearch.pp @@ -44,7 +44,7 @@ class openstack_project::elasticsearch ( cron { 'optimize_old_es_indices': user => 'root', - hour => '5', + hour => '13', minute => '0', command => 'curl -sS -XPOST "http://localhost:9200/logstash-`date -d yesterday +\%Y.\%m.\%d`/_optimize?max_num_segments=2" > /dev/null', environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',