Greetings
My incoming messages contain subarrays in the following format:
com.openexchange.ajax.action
com.openexchange.ajax.module
com.openexchange.database.schema
com.openexchange.grizzly.method
com.openexchange.grizzly.queryString
com.openexchange.grizzly.remoteAddress
com.openexchange.grizzly.remotePort
com.openexchange.grizzly.requestURI
com.openexchange.grizzly.serverName
com.openexchange.grizzly.servletPath
com.openexchange.grizzly.session
com.openexchange.grizzly.threadName
com.openexchange.grizzly.userAgent
com.openexchange.login.authId
com.openexchange.login.client
com.openexchange.login.clientIp
com.openexchange.login.login
com.openexchange.login.userAgent
com.openexchange.login.version
com.openexchange.mail.accountId
com.openexchange.mail.host
com.openexchange.mail.login
com.openexchange.mail.session
com.openexchange.request.trackingId
com.openexchange.session.authId
com.openexchange.session.clientId
com.openexchange.session.contextId
com.openexchange.session.sessionId
com.openexchange.session.userId
com.openexchange.session.userName
However, I would like to strip off the com.openexchange
part of each field. Is that possible? Preferrably without having to list the ajax
, database
, etc. subfields.
I tried this filter, but it doesn't move anything:
mutate {
rename => { "com.openexchange.grizzly" => "grizzly" }
rename => { "com.openexchange.mail" => "mail" }
rename => { "com.openexchange.request" => "request" }
rename => { "com.openexchange.database"=> "database" }
rename => { "com.openexchange.ajax" => "ajax" }
rename => { "com.openexchange.login" => "login" }
rename => { "com.openexchange.session" => "session" }
}
I also tried a Ruby filter, but it creates fields with null in them:
ruby {
code => '
event.set("[grizzly]", event.get("[com][openexchange][grizzly]"))
event.set("[mail]", event.get("[com][openexchange][mail]"))
event.set("[request]", event.get("[com][openexchange][request]"))
event.set("[database]", event.get("[com][openexchange][database]"))
event.set("[ajax]", event.get("[com][openexchange][ajax]"))
event.set("[login]", event.get("[com][openexchange][login]"))
event.set("[session]", event.get("[com][openexchange][session]"))
'
}
Of course, renaming individual leafs will work, but that's tedious, and not general in case I add more in the log source.