[ResponseOps] Add support for the "running" flag to the rule object #147759
Labels
8.7 candidate
Feature:Alerting/RulesFramework
Issues related to the Alerting Rules Framework
Feature:Alerting/RulesManagement
Issues related to the Rules Management UX
Team:Detection Rule Management
Security Detection Rule Management Team
Team:Detections and Resp
Security Detection Response Team
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
Team: SecuritySolution
Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
v8.7.0
Based on: RFC: Consolidating rule statuses for RAC Rule Management / Monitoring (internal)
Depends on: #135127
Related to: #118511
Summary
In Security Solution, we have a dedicated
running
rule status and show it on the Rule Management and Rule Details pages. This way our users are able to see which rules (or if a given one) are currently running, which becomes especially important for long-running rules. We'd like to preserve this feature.The RFC: Consolidating rule statuses for RAC Rule Management / Monitoring proposes adding a new
running
field to the rule object which the Alerting Framework would update totrue
once the rule starts and tofalse
once it finishes execution. This field hasn't been implemented yet and we need to do that.Details
There is a performance-related caveat that needs to be taken into account. Updating a saved object can take a long time, in this case updating this
running
field might take longer than actually running the rule'sexecutor
function. See more details in #118511:Some ideas for handling that efficiently:
running
field if the rule runs longer than X (e.g. 2 seconds). Thus, it won't be updated for most of the rules.running
field. Instead, push this update to a stream and process it concurrently (e.g. using rxjs). Debouncerunning: true
additions to the stream by X.running: false
should cancel the previousrunning: true
if the latter has not been handled yet.running: true
and already called saved objects client,running: false
should wait and continue after that.running: false
should end (close) the stream.refresh: false
when updating therunning
field. See also this ticket.The text was updated successfully, but these errors were encountered: