opensearch-project / alerting

📟 Get notified when your data meets certain conditions by setting up monitors, alerts, and notifications
https://opensearch.org/docs/latest/monitoring-plugins/alerting/index/
Apache License 2.0
62 stars 102 forks source link

[FEATURE] Give Trigger Actions access to monitor response payload #1072

Open mnkugler opened 1 year ago

mnkugler commented 1 year ago

Is your feature request related to a problem? Triggers Actions seems not having access to the monitor response payload. Customer has created a monitor, with attribute size. When the trigger condition is met, they would like to retrieve the response as parameter payload of the action, so the action can dynamically address any event that the monitor is set to raise an action for.

What solution would you like? Use the payload of a query in the Action message to give a clear reason on why there is an alert.

lezzago commented 1 year ago

@mnkugler, this should already be supported by using ctx.results in the action message.

https://opensearch.org/docs/latest/observing-your-data/alerting/monitors/#other-variables Under the description for ctx.results. it mentions that ctx.results[0] should contain the monitor query results.

What type of monitor is the customer using and can we get an example of what is the customer looking for?