Skip to content

Instantly share code, notes, and snippets.

@shift
Last active January 6, 2016 11:06
Show Gist options
  • Save shift/cd6dc5b83e889b634584 to your computer and use it in GitHub Desktop.
Save shift/cd6dc5b83e889b634584 to your computer and use it in GitHub Desktop.
input {
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 {
elasticsearch {
hosts => "ELASTICSEARCH_HOST:ELASTICSEARCH_PORT"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment