Merge "Incrase heap size for logstash indexers."
This commit is contained in:
commit
974819db58
@ -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
|
||||
|
@ -0,0 +1,3 @@
|
||||
# Increase the max heap size to twice the default.
|
||||
# Default is 25% of memory or 1g whichever is less.
|
||||
JAVA_ARGS='-Xmx2g'
|
@ -27,6 +27,14 @@ class openstack_project::logstash_worker (
|
||||
sysadmins => $sysadmins,
|
||||
}
|
||||
|
||||
file { '/etc/default/logstash-indexer':
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => 'puppet:///modules/openstack_project/logstash/logstash-indexer.default',
|
||||
}
|
||||
|
||||
class { 'logstash::indexer':
|
||||
conf_template => 'openstack_project/logstash/indexer.conf.erb',
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user