asp
February 17, 2017, 2:44pm
1
Hi,
I am on kibana 5.1.2.
I have some a field, which shows bytes, but I would like to convert it in an aggregation to MB.
I found out how to do it with scripted fields, but now my question is, can I do this with JSON Input too?
What do I need to enter in the json part, if I want to calculate value/1024/1024 ?
Do I need to enable scripting in elasticsearch? How?
thanks, Andreas
shaunak
(Shaunak Kashyap)
February 18, 2017, 3:57am
2
Try this in the JSON input field:
{
"script": {
"inline": "doc['system.memory.used.bytes'].value / 1024 / 1024",
"lang": "painless"
}
}
7 Likes
asp
February 20, 2017, 7:49am
3
great, it works. Thanks a lot.
system
(system)
Closed
March 20, 2017, 7:51am
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.