[Security Solution] Add "alerts_candidate_count" rule execution metric#259917
[Security Solution] Add "alerts_candidate_count" rule execution metric#259917maximpn merged 4 commits intoelastic:mainfrom
Conversation
|
/ci |
|
/ci |
|
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management) |
nikitaindik
left a comment
There was a problem hiding this comment.
I read through the code and tested that alerts_suppressed_count is calculated correctly for each rule type.
On a high level, for each rule type, I created two rules: one with suppression, one without. Then for each rule I ingested a few source events, ran a rule, inspected metrics.alerts_candidate_count and metrics.alerts_suppressed_count on the the resulting "execute" events in the event log. I expected alerts_candidate_count to be equal to the number of events I ingested and more than alerts_suppressed_count.
- ✅ Query
- ✅ EQL
- ✅ ESQL
- ✅ New Terms
- ✅ Indicator Match
- ✅ Threshold
- ✅ ML
💚 Build Succeeded
Metrics [docs]
cc @maximpn |
…e_for_children6 * commit '3402744f63ca1196e97b11ffac4e7f7efab240df': (80 commits) [PerUserAuth] Add EARS auth type for Connectors V2 (elastic#253695) Fix `@elastic/eui/require-aria-label-for-modals` lint violations across `@elastic/kibana-core` files (elastic#259757) [Entity Analytics][Leads generation][4] Add API routes, LeadDataClient, and async generation (elastic#257046) [Agent Builder] Agent-centric UX redesign (elastic#258005) fix query streams failing test (elastic#260277) [Lens as code] Add list layout to the new API (elastic#259967) [FTR] Add warning comments to deployment-agnostic FTR base configs (elastic#260018) [Discover][Logs profile] Fix missing search highlights (elastic#260056) Plugin system: safe deletion (elastic#259038) [Infra] Fix Hosts filter options to match selected schema (elastic#259825) Manual Entity Resolution and flyout representation (elastic#260162) [Cascade] Handle grouping on fields with unset values (elastic#260033) [Fleet] generate OTel config for integration packages with otelcol inputs (elastic#259968) [Search] Switch over to V2 index management details (elastic#259866) [inference] increase timeout for ES inference calls (elastic#260382) [ES|QL] Enable subqueries (elastic#257455) [ES|QL] Change Point order free options (elastic#260282) [Auth] Added authentication strategy for UIAM OAuth (elastic#256182) [Security Solution] Add "alerts_candidate_count" rule execution metric (elastic#259917) [api-docs] 2026-03-31 Daily api_docs build (elastic#260380) ...
elastic#259917) **Addresses:** elastic#255513 **Relates to:** elastic#257203 ## Summary This PR adds logic to calculate `alerts_candidate_count` rule execution metric. The mapping was added in elastic#257203. ## Details `alerts_candidate_count` rule execution metric represents the number of detected alerts before any alerts suppression is applied. Alerts may be suppressed when alerts suppression by some field(s) in a certain time window is configured. Or it's a duplicate alert so Elasticsearch won't index alert documents with the same ids. The calculation logic varies based on the rule type but the logic described in the previous paragraph persists.
elastic#259917) **Addresses:** elastic#255513 **Relates to:** elastic#257203 ## Summary This PR adds logic to calculate `alerts_candidate_count` rule execution metric. The mapping was added in elastic#257203. ## Details `alerts_candidate_count` rule execution metric represents the number of detected alerts before any alerts suppression is applied. Alerts may be suppressed when alerts suppression by some field(s) in a certain time window is configured. Or it's a duplicate alert so Elasticsearch won't index alert documents with the same ids. The calculation logic varies based on the rule type but the logic described in the previous paragraph persists.
Addresses: #255513
Relates to: #257203
Summary
This PR adds logic to calculate
alerts_candidate_countrule execution metric. The mapping was added in #257203.Details
alerts_candidate_countrule execution metric represents the number of detected alerts before any alerts suppression is applied. Alerts may be suppressed when alerts suppression by some field(s) in a certain time window is configured. Or it's a duplicate alert so Elasticsearch won't index alert documents with the same ids.The calculation logic varies based on the rule type but the logic described in the previous paragraph persists.