Scripted fields for Kibana alerting not showing

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.

Hello Aniket!

What rule type is this that you're creating? Is it the index threshold, or elasticsearch query rule type, or is it one of the observability rule types?

Hi Patrick

Thanks for replying

I'm trying to create an index threshold rule as there is no any pre configured observability rule.

I just tried, and am unable to use a scripted field defined in a Kibana Index Pattern, in the "grouped over" field. Which means it probably doesn't work for numeric fields used in the actual threshold value being checked.

This did work at some point, so I think we should get an issue opened for this. If you'd like to open one, that's fine, post the link to the issue here and I'll make sure it has all the right labels on it. Or I can open one.

Use the following URL to open a new issue: Sign in to GitHub · GitHub

request to open/create a new issue and share the link to track the issue.

Thanks for reporting. I've opened the following issue to track:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.