Created
July 11, 2020 11:42
-
-
Save wshihadeh/0e1221ce5286cfb39eaf23a4671369c2 to your computer and use it in GitHub Desktop.
This file contains 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
<match pattern> | |
@type key_value_parser | |
key log | |
remove_key true | |
remove_prefix /^[^ ]+\s[^ ]+/ | |
use_regex true | |
filtered_keys key,gkey | |
</match> | |
# Input Data | |
{ | |
'time' => '2013-02-12 22:01:15 UTC', | |
'log' => "Start Request sub_key=0 sub_akey=11 sub_zkey=12 key=10 gkey=100 nkey=108 skey='this is a miltispace line' akey=20 zkey=30 dkey=4" | |
} | |
# Output Data | |
{ | |
"time"=>"2013-02-12 22:01:15 UTC", | |
"gkey"=>"100", | |
"key"=>"10" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment