Skip to content

Instantly share code, notes, and snippets.

@vmadman
vmadman / logstash-supervisord
Created April 27, 2013 06:48
An example SupervisorD configuration for all three logstash components. Some of it might look obvious, but it took a ton of tweaking to figure it out. (but I might just be dumb)
[program:lss]
process_name=Shipper
command=java -jar /usr/local/logstash/bin/logstash-1.1.9-monolithic.jar agent --config /usr/local/logstash/conf/shipper.conf --log /usr/local/logstash/log/shipper.log
user=logstash
startretries=3
redirect_stderr=true
std_out_logfile=NONE
startsecs=3
environment=HOME="/usr/local/logstash/"
@vmadman
vmadman / logstash-indexer
Created April 27, 2013 06:46
A configuration for a logstash agent. This agent accepts input from REDIS and outputs to Graylog2 using GELF. An additional STATSD output sends throughput stats to statsd, which outputs to graphite.
input {
redis {
host => "###REDIS_IP###"
type => "redis-input"
# these settings should match the output of the agent
data_type => "list"
key => "logstash"
# We use json_event here since the sender is a logstash agent
format => "json_event"
@vmadman
vmadman / logstash-shipper
Created April 27, 2013 06:43
A configuration for a logstash agent. This logstash agent collects logs from apache access, apache error, and syslog via UDP.
input {
tcp {
port => 5000
type => "syslog"
host => "127.0.0.1"
}
udp {
port => 5000
type => "syslog"
host => "127.0.0.1"