Skip to content

Instantly share code, notes, and snippets.

@GaryRogers
Last active December 6, 2016 16:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GaryRogers/9e03e1b1360087f08b08 to your computer and use it in GitHub Desktop.
Save GaryRogers/9e03e1b1360087f08b08 to your computer and use it in GitHub Desktop.
Logstash Redis warning pattern
# Redis Debug Config to match on normal and warning Redis log lines.
input {
stdin { codec => "plain" }
}
filter {
grok {
# Extends the normal redis pattern to account for warnings as well.
match => [ "message", "\[%{POSINT:pid}\] %{REDISTIMESTAMP:timestamp} # %{LOGLEVEL:level} %{GREEDYDATA:mymessage}"]
match => [ "message", "\[%{POSINT:pid}\] %{REDISTIMESTAMP:timestamp} \* %{GREEDYDATA:mymessage}"]
}
}
output {
stdout { codec => rubydebug }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment