Hello,
I'm looking for some help with getting an ESQL query based alert to expose the documents results so that it can be used in the customDetails of the pagerduty payload when triggered.
Looking at the an example of a triggered alert the documents or results are not available but things like the query, alert name etc are available and can be used.
Is this a feature that can be worked on or am I missing something to make the results available?
Below are some details giving an example of what I've done.
-
An ESQL query returns the below result of Heartbeats.
-
The query is put into an alert that has the below payload in the Pagerduty custom details
{"results":"{{#context.hits}}{{fields.Heartbeats}}{{/context.hits}}"}
-
The resulting alert triggered in Pagerduty has no field returned.
-
If I go to the triggered alert in elastic and view the details, I cannot see the context data for the documents that triggered the alert either.
-
I've tried variations of the usage described in this document but it's just not working to get the context data.
- List item
Thank you!