Hi
I am creating logstash filter, for a message like below
10.134.246.236 - username [24/Oct/2018:15:51:39 +0200] "POST /xyz/xyz/xyz/
i need to create a filter, which will check the length of username and create a tag (long or short) or create a field like long-username or short--username
i am kind of new to logstash and need help
My logstash conf looks like this
input {
stdin { }
}
filter {
grok {
match => { "message" => "%{IP:client_ip} - %{USERNAME :user}-" }
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}
output {
stdout { codec => rubydebug }
}