I think you could put this script in the JSON Input field, but I found it a little easier to create a Scripted Field on my index to do it. And then you can use the scripted field in many visualizations without having to replicate that JSON Input code.
In the screenshot below, I used some number type field metricset.rtt and used it in a scripted field of type date.
I set the Format to Date, and the pattern to minutes:seconds mm:ss. I guess it assumed the value was milliseconds so I multiplied by 1000. I named my scripted field metricset.time
Now in Discover I can add both the original metricset.rtt and my scripted field metricset.time so I can check that the calculation is working as expected.
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.