Log4j input host without port

I'm using log4j input to ES with a SocketAppender.

I'm looking for a way to remove the port-portion of the host-field, or add another field with only containing the host/IP of that host field.

Is there an easy way to accomplish one of the two options?

I found an old issue (dating back to Feb 2014) https://logstash.jira.com/browse/LOGSTASH-1914

I looked into the filters and found a way by using the mutate filter

filter {
mutate {
split => { "host" => ":" }
add_field => { "hostIp" => "%{[host][0]}" }
add_field => { "hostPort" => "%{[host][1]}" }
}
}