Skip to content

Instantly share code, notes, and snippets.

@turtlebender
Created February 13, 2012 13:45
Show Gist options
  • Save turtlebender/1817059 to your computer and use it in GitHub Desktop.
Save turtlebender/1817059 to your computer and use it in GitHub Desktop.
Logstash upstart files
description "logstash collector server"
start on runlevel [2345]
stop on runlevel [06]
# tell upstart we're creating a daemon
# upstart manages PID creation for you.
expect fork
script
test -d /var/log/logstash || mkdir /var/log/logstash
cd /var/lib/logstash
exec sudo java -jar logstash-1.1.0-monolithic.jar agent -f /etc/logstash-collector.conf --log /var/log/logstash/logstash-collector.out &
emit logstash-indexer-server_running
end script
description "logstash index server"
start on runlevel [2345]
stop on runlevel [06]
# tell upstart we're creating a daemon
# upstart manages PID creation for you.
expect fork
script
test -d /var/log/logstash || mkdir /var/log/logstash
cd /var/lib/logstash
exec sudo java -jar logstash-1.1.0-monolithic.jar agent -f /etc/logstash-indexer.conf --log /var/log/logstash/logstash-indexer.out &
emit logstash-indexer-server_running
end script
description "logstash web server"
start on runlevel [2345]
stop on runlevel [06]
# tell upstart we're creating a daemon
# upstart manages PID creation for you.
expect fork
script
test -d /var/log/logstash || mkdir /var/log/logstash
cd /var/lib/logstash
exec sudo java -jar logstash-1.1.0-monolithic.jar web --log /var/log/logstash/logstash-web.log &
emit logstash-web-server_running
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment