Using Kibana UI, I created a new script field named "cpu_util_percnt". Value of this field will be calculated based on the following expression:
Here, "metric value number" is an existing field with long data type.
In the "Discover" tab, I could find the new field "cpu_util_percnt" and then selected it for performing a search. When I validated the search results, I noticed the following things as shown in the below table:
Here, we could find that the whole number multiplication works correctly and provides expected result. For example, 1020 * 100 = 1020000. But, the decimal multiplication yields wrong results, i.e., 0.12* 100 should results 12. But, it yields 0.
Kindly check and tell me how to correct the above things to achieve the expected result.