You could do that with a scripted field in kibana (see here and here for examples).
In logstash you could do it using a ruby filter. See here and here for code examples.
© 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.