-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Alerting] write more alert data to event log when scheduling actions #63257
Comments
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
Taken from #47713 (comment):
The other thing that's important is not only showing "firing" alerts in the UI, but also showing "resolved" alerts, as long as the resolution of the alert occurred in the configured time period. |
We should be able to get this information now - we now write event documents for when an alert instance did not schedule actions on the previous turn, but did schedule actions on the current turn (this instance is now "active"). And also for the opposite - the alert instance did schedule actions on the previous turn, but did not schedule actions on the current turn (this instance is now "resolved"). How this will be rendered in the UI is not clear, but it should be possible to see the "starts" and "resolved" for a particular instance, and get the duration of how long it was active. |
For Stack Monitoring (and perhaps other solutions), we need a way to store opaque data into this stream (perhaps not even indexed). We are building a landing page that users will see once they click a deep-link from an alert email. Right now, this landing page only has the capability to view currently firing alerts (which is fine to start with), but we'd like to support the familiar time picker on the page and allow the user to go back in time to view alerts that fired in the past. An example of the data structure used to power the above:
From an API perspective, we are getting this data via:
It'd be great if this same API could accept a time range and return the same exact structure for matching entries in the event log for the time period. |
It would be cool to be able to time-travel through alert states via
I wasn't thinking we'd be keeping the state around for every alertType executor run - that seems like it would be very expensive in terms of document size. It does seem like we should allow for the possibility of allowing an alertType to add extra data when action groups are scheduled via We'll need to make sure we can measure the size of these things, in aggregation, for cases where the index space usage is growing faster than expected. Perhaps customers should have a say in how much data we store? Per comments at the top ^^^, seems like the alertType should opt-in to this, via some new actionType flag(s). In terms of where to store it in the event log - I'll poke around again, but AFAIK there's no good fit for an existing property here, so likely adding a new one to our custom |
As a separate issue, there ARE some existing ECS fields for some of the properties in your example, namely this part:
The dream has also been to be able to make use of these fields, and my thinking along those lines would be to allow some new object to be passed into We can always add that capability later - I'm guessing using that as the only way to add additional data the event log is going to be rather limiting, or at least cumbersome, as I'm sure we'd have lots of alertType-specific custom fields we'd have to add for apps/solutions. |
We've added recent fields to the event log documents and follow up issues will be created as needed. |
Currently, the data we are writing the event log for alerts scheduling actions is pretty spartan:
kibana/x-pack/plugins/alerting/server/task_runner/create_execution_handler.ts
Lines 90 to 102 in 55a3cc4
There seems to be some interest in capturing more information here, like instance state.
Two hurdles:
_source
The text was updated successfully, but these errors were encountered: