gregbk
(greg)
June 30, 2017, 2:19pm
1
Hello,
I have trouble finding documentation for paintless script. https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-painless.html
I don't know java nor groovy. I just wanted to do a max of 3 values in a gauge.
So I will display 99% red color if one one of CPU, SWAP, DISK goes to 99%.
Anyone can help me find examples?
Thanks for your help!
Greg
I think this should work for you:
Math.max(params.swap, Math.max(params.cpu, params.disk))
Painless is a pass-through for a lot of basic java functions (like Math.max()
), hence the syntax in this case
system
(system)
Closed
August 4, 2017, 1:27pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.