I have a dump file of JSON documents where many of the fields are in HEX. I want to import this into Elasticsearch using Logstash. Can Logstash convert HEX fields to ASCII?
Thanks,
Glenn
I have a dump file of JSON documents where many of the fields are in HEX. I want to import this into Elasticsearch using Logstash. Can Logstash convert HEX fields to ASCII?
Thanks,
Glenn
Not by itself, no.
There's no built-in filter for this but it should be easy to do with a ruby filter and some custom Ruby code.
Or if you built a filter it'd be an awesome community resource
Does it exists yet? Help me out, Im will make this plugin! How can I begin?
Forget it, I found IT: https://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_input_plugin.html
I found a simple way if you are just doing double quotes. the trick is using single quotes around the double quote for replace
mutate {
gsub => ["request", "\x22", '"']
}
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.