Skip to content

Instantly share code, notes, and snippets.

@jthomas
Forked from pblittle/logstash.conf
Last active July 31, 2017 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jthomas/04830b89223da11d04d9 to your computer and use it in GitHub Desktop.
Save jthomas/04830b89223da11d04d9 to your computer and use it in GitHub Desktop.
input {
stdin {
type => "stdin-type"
}
tcp {
port => 5000
type => syslog
}
udp {
port => 5000
type => syslog
}
file {
type => "syslog"
path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ]
}
file {
type => "logstash"
path => [ "/var/log/logstash/logstash.log" ]
start_position => "beginning"
}
}
filter {
if [type] == "docker" {
json {
source => "message"
}
mutate {
rename => [ "log", "message" ]
}
date {
match => [ "time", "ISO8601" ]
}
}
}
output {
stdout {
codec => rubydebug
}
elasticsearch {
embedded => ES_EMBEDDED
host => "ES_HOST"
port => "ES_PORT"
protocol => "http"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment