Skip to content

Instantly share code, notes, and snippets.

@mre
Created May 13, 2014 08:43
Show Gist options
  • Select an option

  • Save mre/723d356f1dde8030a80c to your computer and use it in GitHub Desktop.

Select an option

Save mre/723d356f1dde8030a80c to your computer and use it in GitHub Desktop.
logstash config
input {
file {
# Path to your logs
path => "/logs/*"
start_position => "beginning"
}
}
filter {
grok {
match => { "message", "(?<DateTime>\d{1,2}/\d{1,2}/\d{2}\s.*MSK)\s(?<threadId>\d\w{7})\s(?<BriefName>\w{13})\s(?<LoggingLevel>.)\s(?<className>ru\..*.Impl)\s(?<MethodName>\w+)\s(?<info>.*)\s(?s:(?<info1>.*))" }
}
}
output {
# Use the following for debugging output
stdout { codec => rubydebug }
# You can also check for a parse failure before processing the data
if !("_grokparsefailure" in [tags]) {
redis { host => "10.0.0.5" data_type => "list" key => "logstash" }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment