The objective is to setup an email alert on heap_utilization where heap_utilization% is greater than 85% group by jvm_name for production enviroment.
I am working on elastic stack version 7.13.0 where I also set up APM agents in the production environment. now I am trying to create a rule or alert on JVM heap usage percentage but there is no such prebuild filed available so I have to create an additional field using a scripted field
"( doc['jvm.memory.heap.used].value / doc['jvm.memory.heap.max'].value ) * 100"
as memoryUsedPct for index pattern "apm-*", this field is visible under discover but for creating rule or email alert the field memoryUsed is not available.
please suggest how to achieve the given objective.