Skip to content

[Request] Documentation for Manual Run of Security rules #5264

@nkhristinin

Description

@nkhristinin

Description

What: We introduce manual rule Runs for security solution.
Why: Users will be able to run rule in the past and specify the date range.

Use cases we cover:

  1. User form rule details page execute manual rule run and specify time rang
  2. They can go to Executions tab and see the backfill group, with information about how much tasks scheduled and in progress/pending
  3. They can stop the whole group for manual run
  4. They can see in execution log result of rule executions and filter by rule type

There additional issue for UX copy: #5265

A little bit of technical background, how it works, which should help with better naming

Let's say we have rule with 5m interval
rule execution log - it represents the results of a single rule execution. it can be running/succeded/failed.
When the user executes Manual rule runs (14:00-16:00)- it creates the Backfill group (we probably need come up with better naming).
Backfill group - it's something, that contains the start and end date range, status of the whole group, and rule info.
Also Backfill group has scheduled entries - it's a list of tasks of potenial rule executions.
When the task manager is free it starts to schedule those tasks - which execute the rule, and then the result of this execution appears in the rule execution log.
scheduled entry - can be pending/running/error/complete
The whole backfill group also can be pending/running/error - depends on status of scheduled entires.
After all scheduled entries are complete - Backfill group is deleted.
We can Delete/Stop only the whole backfill group, but not individual backfill group.

Background & resources

Which documentation set does this change impact?

ESS and serverless

ESS release

8.15 8.16

Serverless release

Monday, July 29, 2024 Tuesday, October 14, 2024

Feature differences

None

API docs impact

Prerequisites, privileges, feature flags

None

Doc plan

  • Update ESS and Serverless UI docs:
    • Base functionality
    • Limitations and best practices: What we discussed in Slack:
      • Manual runs will execute with low priority and limited concurrency, meaning they might take longer to complete, especially if there are many rules to backfill. Scheduled rules has higher priority and some limited concurrency. But limit is higher
      • Rule parameters are fixed at the time of manual rule run scheduling, meaning any updates to the rules afterward will not be reflected in the manual rule run. For example:
        1. We create a rule - Name - "Rule 1", interval - 5 min, query: "*"
        2. We execute manual rule run, and let's say it's long process taking hours
        3. Immediately after that we a changing rule name to "Rule 2", interval to 10 hours and query to "host.name:2"
        4. All rule execution which are planned after manual rule run executed will use original parameters - Name - "Rule 1", interval - 5 min, query: "*"
      • Users are responsible for ensuring the correct order of backfill jobs (manual rule runs) if dependencies exist between them. Incorrect scheduling can lead to inconsistent data filling.
    • The kibana.alert.intended_timestamp field has been added to the alert schema. This field appears in documents of alerts that were generated by manual rule runs. They convey the estimated time range of when the alert was created.
  • Update rule API docs:
  • Add known issues (noted in the comments) to the 8.16 release notes - Noted at 8.16.0 Release notes #5941

Doc updates

NOTE: The feature is being released in Tech Preview in 8.15, so will need to use that label/admonition for ESS and Serverless docs.

Execution results: Make the following updates:

  • In the intro para, add that users can now see how a rule was executed. Now, rules can be executed manually or auto-executed on a (preset?) schedule.
  • Update rule-execution-logs.png - new image should show the updated Execution log table and the new Manual runs table.
  • Add two bullets to the list of controls that allow users to filter what's in the Execution log table. The new items are:
    • Run type - New filter that allows users to display the execution type of a run. The two options are Manual and Scheduled.
    • Show source event time range: Toggling this setting on displays the Source event time range column. By default, this setting is toggled off.

Manage detection rules:

  • Add an item to the list of actions that users can take from the Rules page. A good place might be after the "manage rules" list item.
  • Add a new section for manually running rules. The new section should include the following details:
    • There are 3 different places where users can manually run a rule:
      • The rule's details page (go to the actions menu in the top right and select Manual run)
      • On the Rule pages, from the actions menu for an individual rule
      • On the Rule page, from the Bulk actions menu (up to 100 rules can be selected for a bulk-run)
    • When selecting a range of time to manually run a rule, you can only choose a past date and time.
      • If you don't change the default timerange selection, the rule will run today and the start time of the run will be 3hrs in the past.
    • Rules must be enabled for you to manually run them.
    • To stop a manual run, go to the Manual runs table and click Stop run in the Actions column.
      Stop rule run
      Screenshot 2024-07-21 at 1 49 38 PM

Metadata

Metadata

Labels

Docset: ESSIssues that apply to docs in the Stack releaseDocset: ServerlessIssues for Serverless SecurityEffort: LargeIssues that require significant planning, research, writing, and testingFeature: RulesPriority: HighIssues that are time-sensitive and/or are of high customer importanceTeam: Detection Enginev8.16.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions