In the logstash mutete filter documentation there seems to be an error, or at least it seems like an error to me
mutate {
split => ["hostname", "."]
add_field => { "shortHostname" => "%{hostname[0]}" }
}
does not work, however this works
mutate {
split => ["hostname", "."]
add_field => { "shortHostname" => "%{hostname][0]}" }
}
Both the field name and the indexing number need to be in square brackets