I'm newbie with Kibana and I tried to get a line graph with CPU ressource (system or user) but values are in number type (between 0 and 1).
I want to multiply by 100 with a scripted field (painless language) but when I did :
return doc['system.memory.used.pct'].value.multiply(100)
or
return 100 * doc['system.memory.used.pct'].value
Values are completly wrong (for exemple 0.964 becomes 2.536, instead of 96.4)
Did I miss something ?
Here the screenshot of my visualization :
I'm slightly surprised that this doesn't work out of the box. If the values are really in percent (and the field ends in .pct
), I think this should just work out of the box. See my example below:
Update:
And here is the same visualization you're using. I only have a single host, but this is just working out of the box:
This is the underlying data in Discover:
And here is the index pattern:
I'd especially make sure that the index pattern is the same — both data type and format.