25 lines
643 B
Plaintext
25 lines
643 B
Plaintext
# logstash - web instance
|
|
#
|
|
# Copied from http://cookbook.logstash.net/recipes/using-upstart/
|
|
|
|
description "logstash web instance"
|
|
|
|
start on virtual-filesystems
|
|
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
|
|
|
|
# This runs logstash web as the 'logstash' user
|
|
su -s /bin/sh -c 'exec "$0" "$@"' logstash -- /usr/bin/java -jar logstash.jar web --backend elasticsearch://127.0.0.1/ --log /var/log/logstash/web.log &
|
|
emit logstash-web-running
|
|
end script
|