Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
input { generator {} }
filter {
ruby {
# Add a \t (tab) by using its ASCII code (9)
code => 'event.set("message", 9.chr + event.get("message"))'
}
ruby {
# Make a new field with the tab removed
code => 'event.set("tabless", event.get("message").gsub(9.chr, ""))'
}
}
output { stdout { codec => rubydebug {} } }
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.