File tree Expand file tree Collapse file tree
x-pack/plugins/security_solution/server/lib/detection_engine/signals Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ export const searchAfterAndBulkCreate = async ({
7070 interval,
7171 buildRuleMessage,
7272 } ) ;
73+ const tuplesToBeLogged = [ ...totalToFromTuples ] ;
7374 logger . debug ( buildRuleMessage ( `totalToFromTuples: ${ totalToFromTuples . length } ` ) ) ;
7475
7576 while ( totalToFromTuples . length > 0 ) {
@@ -294,5 +295,6 @@ export const searchAfterAndBulkCreate = async ({
294295 }
295296 }
296297 logger . debug ( buildRuleMessage ( `[+] completed bulk index of ${ toReturn . createdSignalsCount } ` ) ) ;
298+ toReturn . totalToFromTuples = tuplesToBeLogged ;
297299 return toReturn ;
298300} ;
Original file line number Diff line number Diff line change @@ -670,6 +670,21 @@ export const signalRulesAlertType = ({
670670 lastLookBackDate : result . lastLookBackDate ?. toISOString ( ) ,
671671 } ) ;
672672 }
673+
674+ // adding this log line so we can get some information from cloud
675+ logger . info (
676+ buildRuleMessage (
677+ `[+] Finished indexing ${ result . createdSignalsCount } ${
678+ ! isEmpty ( result . totalToFromTuples )
679+ ? `signals searched between date ranges ${ JSON . stringify (
680+ result . totalToFromTuples ,
681+ null ,
682+ 2
683+ ) } `
684+ : ''
685+ } `
686+ )
687+ ) ;
673688 } else {
674689 const errorMessage = buildRuleMessage (
675690 'Bulk Indexing of signals failed:' ,
Original file line number Diff line number Diff line change 55 */
66
77import { DslQuery , Filter } from 'src/plugins/data/common' ;
8- import moment from 'moment' ;
8+ import moment , { Moment } from 'moment' ;
99import { Status } from '../../../../common/detection_engine/schemas/common/schemas' ;
1010import { RulesSchema } from '../../../../common/detection_engine/schemas/response/rules_schema' ;
1111import {
@@ -263,6 +263,11 @@ export interface SearchAfterAndBulkCreateReturnType {
263263 createdSignalsCount : number ;
264264 createdSignals : SignalHit [ ] ;
265265 errors : string [ ] ;
266+ totalToFromTuples ?: Array < {
267+ to : Moment | undefined ;
268+ from : Moment | undefined ;
269+ maxSignals : number ;
270+ } > ;
266271}
267272
268273export interface ThresholdAggregationBucket extends TermAggregationBucket {
You can’t perform that action at this time.
0 commit comments