Skip to content

Instantly share code, notes, and snippets.

@brunoguerra
Created December 15, 2015 19:08
Show Gist options
  • Save brunoguerra/a38eb279eddb4309032e to your computer and use it in GitHub Desktop.
Save brunoguerra/a38eb279eddb4309032e to your computer and use it in GitHub Desktop.
input {
tcp {
'port' => "9998"
codec => json
}
udp {
'port' => "9999"
codec => json
}
stdin {
type => "stdin-type"
}
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