opendistro-for-elasticsearch / alerting-kibana-plugin

📟 Open Distro Kibana Alerting Plugin
https://opendistro.github.io/
Apache License 2.0
139 stars 62 forks source link

Save data into "ctx" for use on Action Message #97

Open ezuazu opened 4 years ago

ezuazu commented 4 years ago

Hello, I think it could be a good functionality to be able to save information within the context (when trigger condition is executed) and then be used in the message of the action. Or if this is already possible, how does it work?

Thanks

celesteking commented 4 years ago

Click on "Trigger condition" "Info" link and you'll be presented with available data. Assuming the Monitor has been created by extraction query method.

aronceroe commented 4 years ago

I use a trigger condition inline script which add new information to context ctx. I can see it in the extraction query and use it in the condition (in ctx.results[0].offenders), but is not available in the action message and doesn't appear as available data in the "info" link. It seems like it needs some kind of refresh of the ctx to recognize the new information added and be available into the action.