Incrase heap size for logstash indexers.

The default java heap size is too small for our logstash indexers.
Double it to 2g. Do this by adding an /etc/default/logstash-indexer file
that the upstart configs source if it is present. This required some
tweaks to the upstart configuration to load the defaults properly.

Co-Authored-By: K Jonathan Harker <k.jonathan.harker@hp.com>
Change-Id: I63447f59f3fa6d466a7d275476121fe8339479dc
This commit is contained in:
Clark Boylan 2014-02-27 10:06:39 -08:00
parent 71b5997918
commit 5855850235
1 changed files with 10 additions and 7 deletions

View File

@ -1,6 +1,6 @@
# logstash - indexer instance
logstash - indexer instance
#
# Copied from http://cookbook.logstash.net/recipes/using-upstart/
# Adapted from http://cookbook.logstash.net/recipes/using-upstart/
description "logstash indexer instance"
@ -10,15 +10,18 @@ stop on runlevel [06]
# Respawn it if the process exits
respawn
respawn limit 5 30
expect fork
# You need to chdir somewhere writable because logstash needs to unpack a few
# temporary files on startup.
chdir /opt/logstash
script
setuid logstash
# This runs logstash indexer as the 'logstash' user
su -s /bin/sh -c 'exec "$0" "$@"' logstash -- /usr/bin/java -jar logstash.jar agent -f /etc/logstash/indexer.conf --log /var/log/logstash/indexer.log &
emit logstash-indexer-running
script
JAVA_ARGS=''
if [ -f /etc/default/logstash-indexer ] ;
then
. /etc/default/logstash-indexer
fi
exec /usr/bin/java $JAVA_ARGS -jar logstash.jar agent -f /etc/logstash/indexer.conf --log /var/log/logstash/indexer.log
end script