Skip to content

Conversation

@vitaliidm
Copy link
Contributor

@vitaliidm vitaliidm commented Dec 1, 2025

Summary

UI

Screenshot 2025-12-03 at 13 12 40

To test

Enable in kibana.dev.yml

xpack.alerting.gapAutoFillScheduler.enabled: true

  1. Ensure you have rules with gaps

There are two ways to create gaps:

  • Manual method:
    Create and enable a security rule that fails(can be ES|QL query that accesses non-existing field or so on) with a 1-minute interval and 0-second lookback.
    After the first run, disable the rule, wait 5 minutes, and then enable it again you should execution error about gaps, and see the gap in the gaps table in the execution tab.
  1. Create and enable the scheduler

Run the following request (adjust as needed for your environment):

curl --location --request POST 'http://localhost:5601/internal/alerting/rules/gaps/auto_fill_scheduler' \
--header 'kbn-xsrf: kibana' \
--header 'elastic-api-version: 1' \
--header 'x-elastic-internal-origin: kibana' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YOUR_AUTHRIZATION' \
--data-raw '{
       "id": "gap-scheduler",
       "name": "gap-scheduler",
       "enabled": true,
       "max_backfills": 1000,
       "num_retries": 3,
       "gap_fill_range": "now-90d",
       "schedule": { "interval": "1m" },
       "scope": ["security"],
       "rule_types": [
         { "type": "siem.queryRule", "consumer": "siem" },
         { "type": "siem.savedQueryRule", "consumer": "siem" },
         { "type": "siem.eqlRule", "consumer": "siem" },
         { "type": "siem.esqlRule", "consumer": "siem" },
         { "type": "siem.thresholdRule", "consumer": "siem" },
         { "type": "siem.newTermsRule", "consumer": "siem" },
         { "type": "siem.mlRule", "consumer": "siem" },
         { "type": "siem.indicatorRule", "consumer": "siem" }
       ]
     }'
  1. Verify that it works

Go to rule details page and observe number of failed attempts in table by hovering over error health indicator in status column. When number of failures becomes greater than number of retries, this gap won't be getting processed anymore

Followup

https://github.com/elastic/security-team/issues/14943

…ackfill scheduler after number of retries reaches configured value
@vitaliidm vitaliidm self-assigned this Dec 1, 2025
@vitaliidm vitaliidm added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Engine Security Solution Detection Engine Area v9.3.0 labels Dec 1, 2025
@elasticmachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

History

cc @vitaliidm

@vitaliidm vitaliidm marked this pull request as ready for review December 3, 2025 17:08
@vitaliidm vitaliidm requested review from a team as code owners December 3, 2025 17:08
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-engine (Team:Detection Engine)

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 11.1MB 11.1MB +443.0B

History

cc @vitaliidm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Detection Engine Security Solution Detection Engine Area Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants