Got it working by adding a validator I guess the problem is that the new kibana is strict if the size is 0 it fails where as 6.4.3 will just ignore and process the next value. Here is the working version of the above:
def output = 0;
List varlist= ['total_usage']; for (s in varlist) { if (doc[s].size()>0) {output = (doc['total_usage'].value *1000000000) * Math.pow(1.024, Math.floor(Math.log(doc['total_usage'].value*1000000000)/Math.log(1000))) }}
return output;
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.