Last active
October 27, 2017 21:52
-
-
Save andrewvc/1b6e5c72cf124ed39d311f9714dac271 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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