Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Redis Logstash Filter
input {
file {
path => "/var/log/redis/redis-server.log"
start_position => "beginning"
type => "redis"
add_field => { "role" => "redis" }
}
}
filter {
if [type] == "redis" {
grok {
pattern => [ "%{POSINT:redis_pid}:[A-Z] %{MONTHDAY} %{MONTH} %{HOUR}:%{MINUTE}:%{SECOND} \* %{GREEDYDATA:redis_message}" ]
}
mutate {
remove_field => "message"
}
mutate {
rename => [ "redis_message", "message" ]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.