In kibana i have field in kilobit/second format, But to calculate the average and to visualize i would need to convert data into megabit/second .
String speed = doc['speed_download.keyword'].value;
long size = Long.parseLong(speed);
long k = (size/256.0);
long m = (size/1024.0);
long g = (size/1048576.0);
long t = (size/1073741824.0);
return size;
Tried with above configuration and code, but it is not working. I am new to ELK, So can someone help to achieve this using painless(scripted filed) in kibana? it would be great helpful.
@aaron-nimocks. I am trying to visualize the average speed in [Day/Weekly/Monthly] basics using Line chart in that case it doesn't show the data in MB. it shows only in KBs. Ideally for the [Day/Weekly/Monthly] it need to show MBs.
My Line Chart visualization settings as follows.
Metrics
Y-Axis
Aggregation - Average
Field - New-Bytes
Buckets
X-Axis
Aggregation - Date Histogram
Field - Start_time
Minimum interval - Week
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.