How to write conditional statements/calculations in elastic Machine Learning

How can I perform a Kibana machine learning anomaly detection job to find out anomalies in query duration. Any ideas how to perform below calculation and include it in the ML detector?
Something like this (postgresql.activity.transaction_start < now() - '1 minute')

Also, Is there any possible way to use KQL in ML?

The datafeed of the anomaly detection job itself will take care of querying the data to be analyzed in accordance with time. The "bucket_span" parameter of the job determines the time intervals that the data gets modeled and analyzed.

I assume that postgresql.activity.transaction_start is just a number or is it a timestamp?

It would be good to see a snippet of the document that contains this field.

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