Skip to content

Instantly share code, notes, and snippets.

@shift
Created June 2, 2015 10:06
Show Gist options
  • Save shift/e9de55254d050c6f644a to your computer and use it in GitHub Desktop.
Save shift/e9de55254d050c6f644a 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 {
host => "ELASTICSEARCH_HOST"
port => "ELASTICSEARCH_PORT"
protocol => "http"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment