Skip to content

Instantly share code, notes, and snippets.

@fbettag
Created September 14, 2017 21:43
Show Gist options
  • Save fbettag/fe02609c40516a58dd1e82241a65597a to your computer and use it in GitHub Desktop.
Save fbettag/fe02609c40516a58dd1e82241a65597a to your computer and use it in GitHub Desktop.
create logstash.conf mutations/conversions for INT and NUMBER out of your patterns folder
cat patterns/*/*|egrep -oe '(BASE10|INT|NUMBER|BASE16FLOAT):[^}]+'|grep :|sort|uniq |awk -F: '{if($1 == "NUMBER"||$1 == "BASE16FLOAT") print "\""$2"\" => \"float\""; else print "\""$2"\" => \"integer\""}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment