Hi,
I'm a little new to logstash.
I'm trying to figure out if there is a way to convert fields that match specific regex to integer:
i thought i could do it with grok but something there is not very clear to me.
use case:
if field name starts with n_ -> convert value to integer
if field name starts with f_ -> convert value to float
else leave it as string
are the "n_" and "f_" sequences present anywhere else in your field names?
If not, you can just test if your field name contains one or the other sequence and then apply the mutate{ convert =>... } to your fields. I should be possible, all that is required is the right condition for the if
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.