Skip to content

Instantly share code, notes, and snippets.

@rsrini7
Created April 6, 2015 16:07
Show Gist options
  • Select an option

  • Save rsrini7/8d615efa7e4537c504bb to your computer and use it in GitHub Desktop.

Select an option

Save rsrini7/8d615efa7e4537c504bb to your computer and use it in GitHub Desktop.
My first java multiline logstash config
input {
file {
add_field => [ 'host', 'localhost' ]
path => '/tmp/application.log'
type => 'app'
codec => 'plain'
start_position => "beginning"
}
}
output {
elasticsearch {
index => "logstash-%{+YYYY.MM.dd}"
host => localhost
}
stdout { codec => rubydebug }
}
filter {
if [type] == 'app' {
multiline {
pattern => '^[^\[]'
what => 'previous'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment