Hi,
I have a question regarding scripted filed in index patterns. My log stash event one of the column name is "model.size" and it's value is like "69147 Bytes". I am trying to convert this value into MBs. So I added a script in index pattern scripted field. When I tried to get my data nothing is populated, if I remove this script data is getting populated. I did not understand what is wrong with my script?
My script is:-
Name: Size_MB
Language: painless
Type: String
Format: default
Script:
if(doc['model.size'].value !=null) {
return doc['model.size'].value / 1024 +'MB';
}
return "";
Please guide me if any thing wrong in the process or if any other way is there let me know.
Thanks in advance..!!