Skip to content

Commit

Permalink
Timestamp fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
madirey committed Nov 25, 2020
1 parent fe956ad commit 2c61c26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const buildSignal = (docs: BaseSignalHit[], rule: RulesSchema): Signal =>
export const additionalSignalFields = (doc: BaseSignalHit) => {
return {
parent: buildParent(removeClashes(doc)),
original_time: doc._source['@timestamp'],
original_time: doc._source['@timestamp'], // This field has already been replaced with timestampOverride, if provided.
original_event: doc._source.event ?? undefined,
threshold_result: doc._source.threshold_result,
original_signal:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ export const signalRulesAlertType = ({
},
{
range: {
'@timestamp': {
[timestampOverride ?? '@timestamp']: {
lte: bucket.lastSignalTimestamp.value_as_string,
},
},
Expand Down

0 comments on commit 2c61c26

Please sign in to comment.